-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Add --base-path
CLI option to override the URL path in the tilejson
#1185
Comments
Do we need to add it to config either? |
@sharkAndshark I just updated this ticket with all the details needed |
It would be nice to add this on config. In my experience, I put Martin behind NGINX and use the |
Yep, I documented it above for both CLI and config file case. @sutanAE, if you use NGINX, why not use rewriting urls config? |
Should this feature ignore X-REWRITE-URL header if it is set? I.e. override it? Or should it only work if there is no x-rewrite-url header? What usecases would there be for its usage? |
Hi @nyurik thank you. That is because I did not read the documentation correctly; my apologies. It seems like the problem is now solved for me. Either way, I think it would still be nice to have something that acts as a base path for Martin. The only thing I can think of is why the developer experience and local development imitates NGINX configuration. I personally develop my app using Node.js with SvelteKit and have Martin running on another port. Martin's URL in localhost and production is different, so the SvelteKit's code is quite messy; there are lots of I hope I am contributing to the discussion—many thanks for developing such amazing software. |
As discussed in #1184, Martin should have an option to override the base path when its being hosted behind a proxy that cannot easily set
x-rewrite-url
header.CLI parameter
Configuration Files
Add
base_path
to the root (in thestruct SrvConfig
)Code changes
base_path: Option<String>
to SrvArgs - similar to howlisten_addresses
is implementedbase_path
to SrvConfigData::new(config)
to theapp_data
in new_serverget_source_info
to additionally takeconfig: Data<SrvConfig>
and use it to override thex-rewrite-url
handling.finalize
does all the needed validations of this value or it should return an error. You will need to add a new error toMartinError
for this.The text was updated successfully, but these errors were encountered: