Skip to content

Frontend base url https results in admin too many redirects #8800

Closed
@bartlubbersen

Description

@bartlubbersen

Preconditions

  1. Magento 2.1.4
  2. PHP7

Steps to reproduce

  1. Setup Magento to use a different url for admin through " admin/url/custom" configuration and make this url use http not https.
  2. Set the unsecure base url in your default configuration to https (so the whole website will be using https)
  3. Now you can't get into the back-end of magento anymore because of too many redirects.

Expected result

  1. Everything should still work correctly, front-end should be entirely using https and back-end should use http.

Actual result

  1. You get a server error with too many redirects.

Comments

I did some debugging on this issue and after some time I see that in function "shouldBeSecure" in class "Magento\Backend\Model\AdminPathConfig" is checking whether the default url configured is using https. While it should check whether the store with id 0 is using https if the custom admin url setting is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions