at this point the base url is being served over https but when i try to open the /admin url of the admin panel I get a mixed content error
Mixed Content: The page at 'domain.name'' was loaded over HTTPS, but requested an insecure resource 'http://ip.address/admin/init'. This request has been blocked; the content must be served over HTTPS.
I am guessing there is a further config somewhere ? any help gratefully received.
param1 is the ENV variable name. param2 is the default value when param1 doesn’t exist.
In your case, you defined https://sub.my.domain as a variable name and env() expects to receive a value from it, but it doesn’t exist so it gets the default value, which is empty '' in your case. So your url right now is an empty string.
So the correct use of env() is:
url: env( 'PUBLIC_URL','https://sub.my.domain'), //PUBLIC_URL should be defined in your environment variables.
Thanks sunnyson, I have now updated the url line to read
url: env(‘PUBLIC_URL’, ‘https://sub.my.domain’),
however that has not affected the problem. the admin interface still tries to call a script at 'http://ip.address/admin/init'
and i still get a mixed content error
Sorry to jump in but I am stuck here as well. One question before proceeding to rebuild… does it mean I will be losing all the content I have previously created in Strapi?