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

Running behind Reverse Proxy in subfolder, public URL generation doesn't work in all cases #310

Closed
gwharton opened this issue Jan 18, 2025 · 0 comments · Fixed by #313
Closed
Milestone

Comments

@gwharton
Copy link

gwharton commented Jan 18, 2025

Description

Repository Cloned 2025-01-18
Operating behind AWS Cloudfront with x-forwarded-prefix set to /packeton
.env.local contains TRUSTED_PROXIES=REMOTE_ADDR
I can login no problem via https://cloudfrontdomain/packeton/
Static assets are all loaded correctly, prefixed with /packeton

However the following pages do not respect the additional prefix.

Case 1

Submitting a new module results in the error

Image

Developer console confirms the system is requesting https://cloudfrontdomain/jobs/xxxxxxxxxxxxxx

Case 2

Adding a new SSH Key under the credentials section is successful, but redirects to the root. Developer console shows that the call to https://cloudfrontdomain/packeton/users/sshkey was successful returning a 302, but the location header in the redirect is set to / resulting being thrown out to https://cloudfrontdomain

Case 3

If i go to the https://cloudfrontdomain/packeton/about#how-to-update-packages page. None of the webhook urls generated contain the prefix. They all present https://cloudfrontdomain/api/github?token=xxxxxxxxxxxxxx

Case 4

the packages.json file does not include the prefix for the metadata-url and the providers-lazy-url fields.

Can you reproduce the bug on the Packeton demo site?

Not applicable

Database

MySQL

Screenshots

No response

How are you running Packeton?

nginx/php-fpm behind AWS Cloudfront proxy

@vtsykun vtsykun added this to the 2.7 milestone Jan 23, 2025
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 a pull request may close this issue.

2 participants