Closed adaptiman closed 4 years ago
I'm having the same issue, but with the API;
Mixed Content: The page at 'https://sub.domain.uk/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://hostip:port/api/v1/news/entry/'. This request has been blocked; the content must be served over HTTPS.
Accessing at hostip:port works fine.
I was able to fix this by editing the openeats-api app at about line 215 by specifying the full URL:
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = 'https://www.mywebsite.com/site-media/'
I don't know if this will work for the API since I'm not having a problem with that piece.
Got the same issue.
I replace the MEDIA_URL part with :
MEDIA_URL = os.environ.get('NODE_API_URL', '') + '/site-media/'
I think it could be a generic way to solve this issue ?
I've successfully setup an OpenEats site at https://www.cookbook.thesweeneys.org. I've secured it with Let's Encrypt. Even though the main site content is served securely, for some reason, all images in the /site-media/ folder are being served via
http
rather thanhttps
. I know that this is probably an Nginx configuration issue, but thought I would see if anyone has had this issue. I've searched all of the repos for incidents ofhttp://
rather than relative paths, but haven't found anything. Thanks for any help you can give.UPDATE (5/30): After carefully examining Nginx, it appears that the React-Redux container (i.e., openeats-web) is constructing an
http://
URL. I'm not familiar enough with this framework to troubleshoot it.Here's my Nginx default.conf file: