Score:0

nginx rewrite rules: Rewrite https://Frontend/backend/Api/SelectAllBranch/ to https://Backend/Api/SelectAllBranch/ or .../SelectAllBranch

vn flag

I'm using this configuration to nginx proxy reverso

 location /backend {
      rewrite ^/backend(.*)$ $1/ break;
      proxy_pass http://credentials-web-bff.cl-milugar:5000;
      proxy_redirect off;
    }

and i don't have problem when Url like https://frontend/backend/mysite , but when the Url finish in "/" this rule didn't work.

can you guys help me ?

Richard Smith avatar
jp flag
Why are you adding an extra trailing `/` in your `rewrite` statement? It should probably be `rewrite ^/backend(.*)$ $1 break;`
Leopoldo Vasquez avatar
vn flag
It is an older angular application , because of that I don't have permission to change those URL on the proxy reverso. I'm only changing the pod setting
Richard Smith avatar
jp flag
Try: `rewrite ^/backend(.*?)/?$ $1/ break;`
Leopoldo Vasquez avatar
vn flag
it's work , thank you , i 'm going to test the others url
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.