Skip to main content

A middleware to ensure only Sentry can access source maps

Project description

django-sentry-secure-source-map

CI PyPI PyPI - Python Version

A middleware to ensure only Sentry can access source maps.

When enabled, only requests from Sentry will be able to access source maps (any URL starting with STATIC_URL and ending .map).

For more information, see Secure Access to Source Maps

Installation

pip install django-sentry-secure-source-map

Then add sentry_secure_source_map.SentrySecureSourceMapMiddleware to your MIDDLEWARE in settings.py. Ideally, it should be placed as high as possible, before tools like whitenoise.

Next, you need to configure the token. Retrieve your project's "Security Token" from the settings page, and set it as SENTRY_SECURITY_TOKEN.

SENTRY_SECURITY_TOKEN = "abcde12345"

If the token isn't set, the middleware does nothing.

"Enable JavaScript source fetching" must be enabled in Sentry.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-sentry-secure-source-map-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-sentry-secure-source-map-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-sentry-secure-source-map-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8fc9dd27e037e239d728e7bd687a7cbb6f418531b22e7addce5c8f79ff0bf0fa
MD5 fbe3c0f42978f62d22b56a80cf0ad3bd
BLAKE2b-256 ee821c91117b5b36f04a853747b37fcfb1d2ee2bd768399fc0216fa3eadfce94

See more details on using hashes here.

File details

Details for the file django_sentry_secure_source_map-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_sentry_secure_source_map-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 346267a8f7d7db8cea488fcdeae5cbb945d783bd35d8841da9ccc086c1f85933
MD5 7be027957aa60fedb5bd59352f4787de
BLAKE2b-256 2fc61d692c3367a4467a0f7bc1490ad9c6d5c9820a5335a3fd721de246a61a4f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page