Multiple Origins
It’s not uncommon for a web application to be accessible at multiple origins. For example:
- Website is operable over both
https
andhttp
- Geolocated web addresses: such as
https://us.example.com
,https://eu.example.com
- Multiple static CDNs: such as
https://static1.example.com
,https://static2.example.com
- Customer-specific domains/subdomains
In this situation, identical JavaScript and source map files may be located at two or more distinct origins. In this situation we recommend using our special tilde (~
) prefix on paths.
So for example, if you have the following:
You can upload using the URL of ~/js/app.js
. This will tell Sentry to ignore the domain and use the artifact for any origin.
Additionally you can also upload the same file under multiple names. Under the hood Sentry will deduplicate these.
The ~ prefix tells Sentry that for a given URL, any combination of protocol and hostname whose path is /js/app.js
should use this artifact. Use this method only if your source/source map files are identical at all possible protocol/hostname combinations. Sentry will prioritize full URLs over tilde prefixed paths, if found.
- Package:
- npm:@sentry/capacitor
- Version:
- 0.18.0
- Repository:
- https://github.com/getsentry/sentry-capacitor