Skip to content

Allow the secure fetching of sourcemaps #1644

Open
@issacgerges

Description

@issacgerges

I'd love the ability to secure the fetch of certain js sourcemaps via something like an auth token.

At the moment, the service seems to assume sourcemaps are publicly available via HTTP

allowed_origins: A list of "allowed origin patterns" that control what URLs we are allowed to scrape from. Allowed origins may be defined in several ways:http://domain.com/[:port]: Exact match for base URI (must include port).
*: Allow any domain.
*.[domain.com](http://domain.com/): Matches [domain.com](http://domain.com/) and all subdomains, on any port.
[domain.com](http://domain.com/): Matches [domain.com](http://domain.com/) on any port.
*:port: Wildcard on hostname, but explicit match on port.
headers: A map of headers to send with every HTTP request while scraping.

A custom header could be used to limit access but it's a bit clunky as

  • The caller is required to provide it
  • The headers will be sent on every http request, and easily leaked

I also noticed the Sentry source option, but these seem Sentry specific?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions