Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Storefront uses http to request to api (api uri with https) to load images #1099

Open
ppldheeraj opened this issue Sep 14, 2021 · 1 comment

Comments

@ppldheeraj
Copy link

What I'm trying to achieve


To fetch all the data of a product (object)

Steps to reproduce the problem

  1. host the saleor api on some different host with https (nginx)
  2. use that url in .env file of saleor-front as next_public_api_uri
  3. start the app, open a category , it doesn't show the images of products, in inspect it can be seen that request is being made to http instead of https while this is not the case with saleor-dashboard.
    Screenshot from 2021-09-01 11-50-41
    Screenshot from 2021-09-15 00-04-21

What I expected to happen

it should make https requests to media content also as it does for other get and post requests.

Screenshots

System information
Operating system:
Browser:

@williamyorkl
Copy link

williamyorkl commented Apr 7, 2022

your nginx should set a https header,

set_header X_FORWARDED_PROTO https

and the django shoud set this in the setting.py

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants