Giter Club home page Giter Club logo

Comments (5)

mikehaertl avatar mikehaertl commented on May 24, 2024

Hmm, currently not at my dev computer, so I can't test. Can you maybe help debug the issue? I can't really see, why it should change the schema. The redirect in this case is probably triggered here:

https://github.com/codemix/yii2-localeurls/blob/master/UrlManager.php#L266

The redirect then happens in redirectToLanguage(). Maybe you can check the $redirectUrl there. Usually this should be a relative URL which is then passed to Response::redirect(). Could it be that this Yii2 method somehow creates a URL with the wrong schema?

from yii2-localeurls.

fabiomlferreira avatar fabiomlferreira commented on May 24, 2024

Thank you for your quick answer. I debug some request and seems that the problem is with Response::redirect().

In any controller if I add something like this:
Yii::$app->getResponse()->redirect('/site/index');

It always redirect to a http request instead of keeping the https.

from yii2-localeurls.

mikehaertl avatar mikehaertl commented on May 24, 2024

For reference, the related Yii issue is yiisoft/yii2#9116

from yii2-localeurls.

fabiomlferreira avatar fabiomlferreira commented on May 24, 2024

Solved thank you mikahaertl you are the one that help me found the problem.

from yii2-localeurls.

mikehaertl avatar mikehaertl commented on May 24, 2024

Closing this as it was caused by a reverse proxy setup with nginx. If you add the right headers in your nginx configuration the problem should be gone.

from yii2-localeurls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.