Skip to content

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

Open
5bug/gin
#4
@alistair-cunningham

Description

@alistair-cunningham

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions