Skip to content

Redirect Loop Error with https store URLs and HTTPS reverse proxy #1460

@matejak

Description

@matejak

Describe the bug
I have a setup with a HTTPS nginx reverse proxy, and it works pretty well when the store URLs use the http:// URI. However, if I change the store URIs to https://, I keep getting redirect loops errors no matter what other settings I use. I think that I ran into a similar issue as #706, but I was not able to get it working. The user references that setting ForceSslForAllPages made it work for them, but I am not able to find that settings.
When reading https://smartstore.com/en/upgrade-for-https-configurations-in-smartstore-5/ I don't see the option that I want, which is https in the store URL, and no redirection if the X-Forwarded-Proto request header says https. I don't want to have HTTPS traffic between the proxy and the Smartstore container.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a SmartStore instance using a container served by a proxy nginx container.
    Configure the server according to the official documentation, set up a http->https redirect (although the SmartStore container now listens on port 80 rather than on port 5000)
  2. Set up stores with HTTP URIs, and see that everything is working all right.
  3. Change HTTP to HTTPS, and start experiencing redirect loops on the particular store, when the https://example.com would 301-redirect to https://example.com. This doesn't change at all if I flip the "Require HTTPS" in the store settings.

Expected behavior
There is no redirect loop, as the app should understand from the request headers that there is no need to redirect the client to the https port, because he already connects via https.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions