Skip to content
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

Fix for #162 - Relative urls for static content #164

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

jdhollander
Copy link
Contributor

This is a fix for issue #162.

Fixes regression where relative urls for the static content became absolute, thus breaking reverse proxy usage. This commit reverts to relative urls for this content, taking into account whether the route that delivers them has a trailing slash or not.

I have tested this behind a reverse proxy, albeit not in great detail. Prefixing the path as outlined in the regression report works perfectly.

Checklist

Fixes regression where relative urls for the static content became absolute, thus breaking reverse proxy usage. This commit reverts to relative urls for this content, taking into account whether the route that delivers them has a trailing slash or not.
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 8006c05 into fastify:master Jul 19, 2024
18 of 21 checks passed
mcollina pushed a commit that referenced this pull request Jul 19, 2024
Fixes regression where relative urls for the static content became absolute, thus breaking reverse proxy usage. This commit reverts to relative urls for this content, taking into account whether the route that delivers them has a trailing slash or not.
@jdhollander jdhollander mentioned this pull request Jul 27, 2024
4 tasks
@DavidTanner DavidTanner mentioned this pull request Nov 6, 2024
4 tasks
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