Skip to content

Wildcard route conflicts with static files #360

@nazwa

Description

@nazwa

Just found an interesting issue:

    r.Static("/assets/", p.rootFolder+"/assets")
    r.GET("/:code", p.redirectHandler)

Generates:

panic: wildcard route ':code' conflicts with existing children in path '/:code'

Seems like it's due to the fact that Static uses *filename wildcard. My plane is due in soon, so can't dig into it now, but I think any static wildcards should be generated below the url path specified, not within root domain.

As in:
/assets/*filename
instead of 
/*filename

Any thoughts?

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