Skip to content

fix(auth): honor X-Forwarded-Proto for reset/invite links and email o… - #42

Merged
thebigjoe1 merged 1 commit into
TraceApps:devfrom
clifmo:fix/forwarded-proto-links
Aug 24, 2026
Merged

fix(auth): honor X-Forwarded-Proto for reset/invite links and email o…#42
thebigjoe1 merged 1 commit into
TraceApps:devfrom
clifmo:fix/forwarded-proto-links

Conversation

@clifmo

@clifmo clifmo commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

…rigin

req.protocol reflects the socket the app sees, not the client's real scheme. Behind a TLS-terminating reverse proxy that forwards plain HTTP to the app, forgot-password links, invite links, and the SMTP-test email's logo origin all rendered as http://. oidc.js and recipes.js already check x-forwarded-proto/x-forwarded-host before falling back to req.protocol; apply the same pattern in auth.js and app-config.js.

Symptom: invite emails containing an http:// link and an http:// embedded image got flagged as spam by mail providers.

…rigin

req.protocol reflects the socket the app sees, not the client's real
scheme. Behind a TLS-terminating reverse proxy that forwards plain HTTP
to the app, forgot-password links, invite links, and the SMTP-test
email's logo origin all rendered as http://. oidc.js and recipes.js
already check x-forwarded-proto/x-forwarded-host before falling back
to req.protocol; apply the same pattern in auth.js and app-config.js.

Symptom: invite emails containing an http:// link and an http://
embedded image got flagged as spam by mail providers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thebigjoe1
thebigjoe1 merged commit 70e3f4a into TraceApps:dev Aug 24, 2026
1 check passed
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