Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect doesn't work after v4.0.0-rc1 #385

Closed
kromanow94 opened this issue Jan 17, 2019 · 6 comments
Closed

Redirect doesn't work after v4.0.0-rc1 #385

kromanow94 opened this issue Jan 17, 2019 · 6 comments

Comments

@kromanow94
Copy link

I've just updated the package and suddenly my redirects stopped working.
Doesn't matter if it goes to external page like google, internal, with query params or not.

Checked out a few latest releases and everything after v4.0.0-rc1 does not work.

My golang backend stands behind nginx proxy. Checked out if I have some errors in the nginx configuration, but it doesn't seem so.

I can place place some code or configuration but I don't suspect my configuration to be erogenous.

@kromanow94 kromanow94 changed the title Redirect works only with v4.0.0-rc1 Redirect doesn't work after v4.0.0-rc1 Jan 17, 2019
@VojtechVitek
Copy link
Contributor

Please, provide reproducer code. Do you use middleware.RedirectSlashes?

@anurag
Copy link

anurag commented Jan 19, 2019

@kromanow94 are you using Compress middleware? Your issue may be related to #382.

@VojtechVitek and @pkieltyka is it worth creating a 4.0.1 with the fix since it's breaking everyone who's using compress?

@kromanow94
Copy link
Author

kromanow94 commented Jan 19, 2019

Sorry for replaying so late! I'm just in the middle of my project for diploma, not having much time for anything else.
Yes, I do. This is my router:

router.Use(                                       
    render.SetContentType(render.ContentTypeJSON),
    middleware.Logger,
    middleware.DefaultCompress,
    middleware.RedirectSlashes,
    middleware.Recoverer,
)

@anurag
Copy link

anurag commented Jan 20, 2019

It should be fixed if you downgrade to the previous major version (3.3.4) or use master.

@kromanow94
Copy link
Author

It does work now with master, thank you! :)

@VojtechVitek
Copy link
Contributor

FYI, https://github.com/go-chi/chi/tree/v4.0.1 released.

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

No branches or pull requests

3 participants