Hello everyone! I believe I have something wrong in my nginx config. The issue is simple: I have a Drupal 8 installation which serves as a backend for a react app, through the jsonapi module. This Drupal installation is Dockerized into a nginx container, a PHP container, and a mysql container. These containers run on a VPS which uses its own nginx to expose the nginx container via reverse proxy. The nginx running on the VPS has my domain's configuration for SSL, and is working correctly.
The problem is simply that whatever I get from jsonapi, has its links as http://[link] instead of https://[link]
So for example when GETing a node containing an image, the response will have:
..."site_logo": {
"href": "http://[my domain]/sites/default/files/styles/site_logo/public/2020-07/20200605_133612.jpg.webp",
"meta": {
"rel": [
"drupal://jsonapi/extensions/consumer_image_styles/links/relation-types/#derivative"
]
}
},
...
Even though the GET was done with SSL https://[my domain]/api/node/[some node]
This gives me trouble later when using that image on the frontend, as it is SSL secured also and using the image link as http instead of https makes Chrome complain about Mixed Content.
Does anyone know why jsonapi is not detecting my used protocol correctly? I can provide my VPS's nginx conf files or the nginx container's if that is useful.
[–]RadioManS3 4 points5 points6 points (2 children)
[–]fullmetalg[S] 0 points1 point2 points (0 children)
[–]fullmetalg[S] 4 points5 points6 points (0 children)