Skip to content

fix: have caddy apply url prefix to relative redirects from services #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025

Conversation

Docteh
Copy link
Contributor

@Docteh Docteh commented May 13, 2025

…g with /

Definitely required for autumn, as /autumn/attachments/:id: will redirect to /attachments/:id:/:filename: But we want the browser to redirect to /autumn/attachments/:id:/:filename:

Speculatively added for the other services

Please make sure to check the following tasks before opening and submitting a PR

  • I understand and have followed the contribution guide
  • I have tested my changes locally and they are working as intended

fixes #137

@Docteh
Copy link
Contributor Author

Docteh commented May 13, 2025

I guess I need to limit git commit titles to 70 characters. oops.

@Docteh Docteh changed the title fix: add url prefix back on when provided a redirect location startin… fix: Caddy needs to apply url prefix to relative redirects Jun 11, 2025
Definitely required for autumn, as an example /autumn/attachments/:id: will redirect to /attachments/:id:/:filename:
But since we are self-hosting, the requester (client) actually needs to be redirected to /autumn/attachments/:id:/:filename:

Speculatively added for the other services

Signed-off-by: Kyle Kienapfel <[email protected]>
@Docteh Docteh force-pushed the rewriteresponse branch from c0e5bdd to fa230cb Compare June 11, 2025 19:42
@Docteh Docteh changed the title fix: Caddy needs to apply url prefix to relative redirects fix: have caddy apply url prefix to relative redirects from services Jun 11, 2025
@Docteh
Copy link
Contributor Author

Docteh commented Jun 11, 2025

Tweaked the commit message so that the title is now under 70 characters


fix: have caddy apply url prefix to relative redirects from services

Definitely required for autumn, as an example /autumn/attachments/:id: will redirect to /attachments/:id:/:filename:
But since we are self-hosting, the requester (client) actually needs to be redirected to /autumn/attachments/:id:/:filename:

Speculatively added for the other services

@github-project-automation github-project-automation bot moved this from 🆕 Untriaged to 💡 Ready to merge in Pull Request Overview Jul 18, 2025
@insertish insertish merged commit db51161 into revoltchat:master Jul 18, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from 💡 Ready to merge to ✅ Merged in Pull Request Overview Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Merged
Development

Successfully merging this pull request may close these issues.

bug: The download path generated by the uploaded file is incorrect
2 participants