View more context

 

taoceanz

Hey I've got this issue where despite loading a site via https, and setting base and alternate url to https protocol, it continues to be served via http which leads to resources not loading. Anyone have experience with this?

taoceanz

It's on AWS but sits in a container behind Ambassador which deals with the TLS bits. The site itself is being served by NGINX listening on port 80 as is what Ambassador passes it after receiving the connection on 443.

taoceanz

SilverStripe\Control\Director::baseURl() is getting nothing when it's attempting to retrieve alternate_base_url, the BASE_URL is nothing which leads to just a forward slash / being returned. I can see methods from the Director class get called multiple times, like absoluteBaseURL, absoluteURL, protocol, is_https etc, and in the life cycle of a single page load, it does eventually start printing https as the protocol, but initially isn't finding nothing for base or alternate url. I thought to set the yml file alternate_base_url is set in to run before framework though that hasn't changed anything

taoceanz

If anyone comes across this, I overcame it by setting the alternate base url in mysite.yml but crucially processing it before framework.

taoceanz

I thought to set the yml file alternate_base_url is set in to run before framework though that hasn't changed anything

ShaneW

In SS4, how do you format a date to contain st, th, nd etc?