I have to migrate my reverse proxy Apache to Traefik
I have an issue about redirection.
Let me tell you more :
I call from backend as an utl_http function (oracle). As I cannot set up wallet (certification confiugration under Oracle), I need a reverse proxy to redirect an HTTP request to my an another HTTPS request.
I don't get your error. Your configuration describes a redirect middleware that does a permanent redirect from http://{{env "LOCAL_IP"}}//path/Call/FromOracleFunction/(.*) to https://externalUrl/api/${1}. So a Permanent Redirect is expected.
Yes you're right. It seems to work on Postman. I get a response (authentication token)
But If I run this snippet of PLSQL Code (which works on apache config) I get in the message's body of the response, this "Permanent Redirect" and token is not present...
I am sorry, my PLSQL is a bit rusty, but when doing an HTTP request, is this code able to make another request when it seems that it followed an HTTP redirect response ?
So, I implemented a hack by mounting an nginx docker image to automatically force redirects. The utl_http client does not allow this (only s/ the GET methods and not POST!)
It's sad that Traefik can't do it
Something like this (nginx config)
I'm sorry if I'm a little fuzzy in my words.
What nginx does here: It automatically forces a follow redirect.
In your solution, the idea is to catch a 307 error and redirect it to a loadBalancer (as service). But, I no longer have the possibility of reaching the url https://externalUrl/api/ but only the server https://externalUrl. Which, in my use case, is not the same...