mvcUrl (spring java) is building wrong link when I access my website with https (SSL flexible)

When I access my website by using https, all links are builded with “:80”, so all the links become wrongs. But when I only with http all links are builded without “:80”. How can I to remove “:80” from url when I’m using SSL?

Thats a question for StackOverflow, not here.

But it happens only with SSL Cloudflare. Anyway, thanks.

It happens when your site is addressed via something else than HTTP (respectively another port) apparently, but thats not Cloudflare related.

1 Like

Really, must be it. I’m using 8080 port and redirecting to 80. Now I’m trying to change default port tomcat to 80, but it isn’t easy for me haha. Thanks.

I’m so confusing because when I access my website without SSL it’s build links “”, but when it’s with SSL becomes “”. Anyway, thanks very much ;).

This topic was automatically closed after 30 days. New replies are no longer allowed.