Skip to content
This repository was archived by the owner on Dec 1, 2017. It is now read-only.
This repository was archived by the owner on Dec 1, 2017. It is now read-only.

output prefix should only be used in hashify function, not in middleware #35

Description

@KevinRausch

The prefix option should only be used in creating output strings in the hashify function. The job of 'path' parsing should be left to routing logic outside the module or to app.use([path],middleware()). Inside the middleware function, there should be no requirement that the path be present in the request url.

For example, my main app handles the path '/' and I have a subapp mounted at '/tools'. In this subapp, urls are cachified at '/tools/[hash]/file.ext'. My routing logic, due to the mounted subapp, strips the /tools portion of the url from incoming requests, so the cachify module only sees '/[hash]/file.ext'. At this point, the module will not see the specified prefix in the url and will not process the request.

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

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions