Score:0

Nginx Proxy_pass is adding www in proxy_pass url

us flag
add_header X-debug-message "$uri";
add_header X-debug-message "$request_uri";
if ($http_user_agent ~* "teams|twitterbot|facebookexternalhit") {
rewrite detail/one  /api/detail/one break;
proxy_pass https://example.online;
  }
}

I am using this config in Nginx to rewrite URL and request on the given domain using proxy_pass. But when the request is hit, it redirects to http://www.example.online/api/detail/one. Why it is adding unnecessary www in the domain and removing HTTPS.

I have tried proxy_set_header Host $host, but not working. I am expecting this url - https://example.online/api/detail/one on requesting through proxy_pass.

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.