Reputation: 3419
if I use redirect to("/")
in my sinatra app it alwasy redirects me to localhost. But I wan't it to redirect to my domain. How do I set the domain?
Upvotes: 0
Views: 411
Reputation: 3419
Ok I finally got it:
in nginx.conf, in the location block insert:
proxy_set_header Host %YOUR_HOST%;
Upvotes: 0
Reputation:
Sinatra does not have a configuration specific for base url. It takes values populated (line 182-196) by your reverse proxy, load balancer, other Rack routers etc. You can try calling
redirect "/"
to see that works for you.
Upvotes: 1