BramP
BramP

Reputation: 51

Grails redirect with reverse proxy

We've developed a Grails application that uses redirects. Beacuse of external reasons, we are just recently using reverse-proxy, to split some traffic to domains: From: demo1.company.local (the server itself)

To: tomcat.company.local (for all java applications, including our grails app) lotus.company.local (for all Domino applications)

Since tomcat is only configured in the hosts file on the demo1 server, the redirects do not work when I access the application from anywhere else then the demo1 server itself.

I've tried to solve this using "absolute" and/or "base" parameter in Grails' redirect(), but if I understand correctly, this is Grails 2+ only and we're using Grails 1.3.4.

Are there other ways to redirect to a specified host? Am I misusing things?

Thanks, Bram

Upvotes: 2

Views: 1491

Answers (1)

Ingo Kegel
Ingo Kegel

Reputation: 47995

If you define grails.serverURL in Config.groovy, redirects with absolute:true will use that value for the URL.

Upvotes: 1

Related Questions