Skip to content

fix(auth): show --allow-insecure hint in HTTPS cookie errors#1087

Merged
perber merged 1 commit into
mainfrom
fix/https-cookie-error-message
May 31, 2026
Merged

fix(auth): show --allow-insecure hint in HTTPS cookie errors#1087
perber merged 1 commit into
mainfrom
fix/https-cookie-error-message

Conversation

@perber

@perber perber commented May 31, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 31, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the auth/config error flow so HTTPS-required cookie errors surface a UI-friendly message that includes guidance to use --allow-insecure for trusted plain-HTTP setups.

Changes:

  • Adds a new localized error template for HTTPS-required auth cookies that includes the --allow-insecure hint.
  • Updates auth routes to emit the new error template for ErrHTTPSRequired.
  • Enhances the UI config loader to map localized API error objects into a readable message (and adds an e2e test to prevent [object Object] regressions).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
ui/leafwiki-ui/src/locales/en/errors.json Adds the new English translation key used by the backend error template.
ui/leafwiki-ui/src/lib/api/config.ts Maps localized error responses from /api/config into a user-facing message string.
internal/wiki/auth/routes.go Switches HTTPS cookie error template to the new key so the UI can display the --allow-insecure hint.
e2e/tests/auth.spec.ts Adds regression coverage ensuring config errors show the hint and never display [object Object].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/src/lib/api/config.ts
@perber
perber force-pushed the fix/https-cookie-error-message branch from cff3acd to 6858c59 Compare May 31, 2026 15:54
@perber
perber merged commit f0f7014 into main May 31, 2026
7 of 8 checks passed
@perber
perber deleted the fix/https-cookie-error-message branch May 31, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants