-
-
Notifications
You must be signed in to change notification settings - Fork 200
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] Issue 904 - Vue app doesn't take into account uri_prefix #967
[FIX] Issue 904 - Vue app doesn't take into account uri_prefix #967
Conversation
Pull Request Test Coverage Report for Build c9799a7f2-PR-967Details
💛 - Coveralls |
@Nactik nice! LMK when this is out of draft and I will give it a review. |
@ARolek |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, lgtm. 👍
was not aware http.StripPrefix
was a thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks excellent! I left a couple of nits line, but no blockers. Can you please squash your commits into a single commit and then I will get this merged in?
🙏
@@ -477,6 +479,163 @@ func TestParse(t *testing.T) { | |||
expected: config.Config{}, | |||
expectedErr: env.ErrEnvVar("I_AM_MISSING"), | |||
}, | |||
"4 test empty proxy_protocol": { | |||
config: ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should move these inline configs to external files. it sure would make this easier to look it ;-)
Remove prefix from static file to serve behind proxy Config vite to serve static file as embedded (Relative path) Update lock file Add Scheme tests Add test for BuildCapabilitiesUrl Add comment on ProxyProtol settings Convert interface{} to any Reset ProxyProtocol when not set
Just merged this into master. Great for contribution! Thank you. |
Fix #904 - uri_prefix not taken into account for the UI
Hey there, here's a quick PR to fix the way tegola UI is served when sitting behind a reverse proxy. I still need to implement and fix test but the idea is here (I will implement them asap)
Changes:
proxy_protocol
(I can change it if you think of a better name) in the config file (config.toml
) to set a custom protocol that will be used to generate the URLs included in the capabilities endpoint responses. (Useful when working under a reverse proxy and when theX-Forwarded-Proto
is not a solution - Fix Specify client protocol in config #134 )uri_prefix
from the request (server/viewer_embed.go
)vite
settings to include static file using a relative path