Jump to content

Switch from ssl to non-ssl in frontend does not work anymore


Recommended Posts

Posted

I tried to update one of my websites from 2.3.8 to 2.3.9 and noticed a problem. I'm using some contact forms, which templates are set up to use ssl only. The other templates are configured to use http only.

If I'm moving back from ssl to non-ssl pages in frontend, I get the following error:

"Moved Permanently
The document has moved here."
 
URL of this page shown in browser is like: http://www.mydomain.com:443/mypage/
(should be for sure: http://www.mydomain.com/mypage)
 
It worked with 2.3.8, so I suppose the problem is somewhere in the file "/wire/core/ProcessWire.php", in function "getHttpHost(Config $config)" - this is one of the places of which "diff -r" is telling me that is has be changed between 2.3.8 and 2.3.9.
 
Posted

In your /site/config.php file, you'll want to set a whitelist of allowed hosts. This was just added in 2.3.9 and it's a recommended security optimization. Include both your SSL and non-SSL host names in there. Please let me know if this resolves the issue you are experiencing?

Posted

Thanks a lot for support, Ryan. Adding the host name to /site/config.php solves the issue. Wish I could change the topic, since it's not a bug, but a feature, and security is a good thing.

  • Like 1
Posted

...Wish I could change the topic, since it's not a bug, but a feature, and security is a good thing.

...well you can :-)...Edit your first post using the full editor (click on "Edit", then click "Use Full Editor")

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...