Skip to content

Reference to current file name? #20

Description

@Lingonmirakel

Hi and thanks for this router!

I'm wondering if it’s possible to get a reference to the current file’s name somehow? I want to set up a redirect scheme and this would be my preferred solution, if at all possible:

routes: {
  …
  '^[^.]+$': {
    …
    headers: {
        'Website-Redirect-Location': `/${/* Here I’d like to be able to access the file’s name */}/`
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions