You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to attach a sub-url to my unit config so that a particular URL proxies, but also rewrites the path passed to the proxy by stripping the sub-url.
For example, a request to /s3/mybucket/blah/foo would proxy to http://1.2.3.4:8333/mybucket/blah/foo, stripping the /s3 from the beginning the path.
I've attempted a bunch of different variations and I can't seem to find a way to make it work, although the documentation says "All route step actions support the rewrite option". Is this just not supported, or am I just doing something wrong?
Hi,
Currently, it's not supported yet. But we've discussed it and will release it in 1.34 as the next version. https://github.com/nginx/unit/issues/544
Btw, it will be different from nginx's way. Nginx provides a number-format variable, but we think it's better to support only captured name variables in Unit.
I would like to attach a sub-url to my unit config so that a particular URL proxies, but also rewrites the path passed to the proxy by stripping the sub-url.
For example, a request to
/s3/mybucket/blah/foo
would proxy tohttp://1.2.3.4:8333/mybucket/blah/foo
, stripping the/s3
from the beginning the path.I've attempted a bunch of different variations and I can't seem to find a way to make it work, although the documentation says "All route step actions support the rewrite option". Is this just not supported, or am I just doing something wrong?
Here's the config:
The text was updated successfully, but these errors were encountered: