Skip to content

Provide an API for modifying URL rewriting #47

Open
@robertknight

Description

@robertknight

For Hypothesis's proxy service we are looking to ensure that all requests to the proxy from a browser are either top-level page fetches or requests from a proxied page. In other words, we want to prevent direct requests of subresources (scripts etc.) from outside of proxied pages.

One approach we are looking at is modifying the URL rewriting process so that subresource URLs on proxied pages include a token of some kind. For this purpose it would be useful to be able to hook into client-side URL rewriting (ie. the rewriteUrl method) and modify the generated URLs.

Although it is possible to do this with the current version of Wombat via monkey-patching it would be preferable to have a documented, public API for this. I'd be happy to help with implementation/testing, but I could use some direction on how the process of configuring Wombat to use this middleware could work.

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