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

Trailing slash stripped even with r.RedirectTrailingSlash = false #4141

Open
alistair-cunningham opened this issue Jan 15, 2025 · 1 comment · May be fixed by 5bug/gin#4
Open

Trailing slash stripped even with r.RedirectTrailingSlash = false #4141

alistair-cunningham opened this issue Jan 15, 2025 · 1 comment · May be fixed by 5bug/gin#4

Comments

@alistair-cunningham
Copy link

I'm porting some existing code from using net/http to using gin. Unfortunately gin breaks all the relative links in the existing HTML templates by stripping off the trailing slash from URLs. It does this even if I set r.RedirectTrailingSlash = false using:

r := gin.Default()
r.SetTrustedProxies(nil)
r.RedirectTrailingSlash = false

Any ideas how I prevent gin from doing this?

@kingcanfish
Copy link
Contributor

I can't reproduce your problem. Can you give me some more specific demos?

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

Successfully merging a pull request may close this issue.

2 participants