Community

Reverse Proxy to docker container with encoded slash

He
Henri #1

Hello everyone,
I am currently working on setting up a reverse proxy that directs traffic to a Docker container, and I’ve hit a bit of a snag.
My application requires that certain URLs containing encoded slashes (%2F) be passed to the Docker container without being decoded or altered.

For example, if a user accesses https://example.com/api/v1/data/a%2Fb, I need the reverse proxy to forward the request exactly as https://example.com/api/v1/data/a%2Fb (with %2F intact), instead of decoding it to https://example.com/api/v1/data/a/b.

In Apache there is ‘AllowEncodedSlashes NoDecode’ but i cant find anything similar or a workaround for openlightspeed.

Has anyone faced a similar issue or knows a way to configure the reverse proxy to forward the URL without decoding the slashes? Any guidance or examples of configuration files would be greatly appreciated!

Thanks in advance!

wa
wagner #2

You can use the guidelines in this topic, with these configurations I can use Cyberpanel as a reverse proxy adjusting with yoursite.com.
nano /usr/local/lsws/conf/httpd_config.conf
In some cases address it is necessary to indicate the full path with https://.
note line 496 - 498 and 499
496 home path redirect
498 full path with https
499 commented if you have the ip with the port

image

Sign in to reply