Home Grails 2.3.6 and Multi-Domain/Multi-Tenancy
Reply: 1

Grails 2.3.6 and Multi-Domain/Multi-Tenancy

sullivan Published in 2018-02-13 16:45:44Z

I'm using Grails 2.3.6 with an nginx. We're extending our app to use multiple domains (web-addresses, not domain classes) with it.

The idea is to check the tld and assign the matching client from the database within a Filter beforeRender. So, therefore I removed config.serverUrl in the production config brackets, otherwise it'll auto-redirect.

So for, it works. But as soon as Grails performs a redirect or createLink(absolute: true), it'll redirect to {correctUrl}:80/myaction. But mostly, the app runs on 443.

Possible ideas:

  • set the serverUrl depending on the web address/domain?
  • override createLink and redirect?

I wasn't able to find this anywhere. Is there a solution? I'm using asset pipeline plugin 2.9.1

sullivan Reply to 2018-02-16 07:33:30Z

I found the solution, it seems that NGINX is the problem. When setting the X-Forwarded-Port, it works.

Found at: Grails spring security redirects to wrong port

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.344676 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO