...where based on the hostname, the proxy will rewrite the / request to go to /cam1
My particular use case doesn't need complex rules, just truncating part of the URL.
From your docs, today it looks like CUSTOM_NGINX_<UPPERCASE_AND_UNDERSCORED_DOMAIN_NAME>_CONFIG_BLOCK plus modifying this server level block would do the trick for me:
but maybe this feature built-in would be useful to other people, if you can simply rewrite a URL. Perhaps there are similar use cases with cameras.example.com/cam1 -> camera1.
This sounds like a fun feature to implement and I'd be willing to make a PR. What are your thoughts? Thanks.
For such simple case as yours, redirect seems adequate. AFAIK rewrite is usually used for very complex scenarios, which is hard to configure in a ENV block anyway.
Hi, I was wondering if it's already possible, or if would be easy to implement, a URL rewrite feature with some similarity to HTTPRewrite in Istio: https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRewrite.
I'm looking at a simple use case, something like this:
...where based on the hostname, the proxy will rewrite the / request to go to /cam1
My particular use case doesn't need complex rules, just truncating part of the URL.
From your docs, today it looks like
CUSTOM_NGINX_<UPPERCASE_AND_UNDERSCORED_DOMAIN_NAME>_CONFIG_BLOCK
plus modifying this server level block would do the trick for me:https://www.journaldev.com/26864/nginx-rewrite-url-rules
but maybe this feature built-in would be useful to other people, if you can simply rewrite a URL. Perhaps there are similar use cases with
cameras.example.com/cam1 -> camera1
.This sounds like a fun feature to implement and I'd be willing to make a PR. What are your thoughts? Thanks.