Skip to main content

Set the Referrer-Policy header for a Datasette site

Project description

datasette-referrer-policy

PyPI Changelog Tests License

Set the Referrer-Policy header for a Datasette site

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-referrer-policy

Usage

Installing this plugin causes every page on your Datasette instance to return this header:

Referrer-Policy: strict-origin-when-cross-origin

You can configure a different policy using this configuration:

plugins:
  datasette-referrer-policy:
    policy: no-referrer

See MDN: Referrer-Policy header for other values.

Development

To set up this plugin locally, first checkout the code. You can confirm it is available like this:

cd datasette-referrer-policy
# Confirm the plugin is visible
uv run datasette plugins

To run the tests:

uv run pytest

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

datasette_referrer_policy-0.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasette_referrer_policy-0.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file datasette_referrer_policy-0.1.tar.gz.

File metadata

  • Download URL: datasette_referrer_policy-0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datasette_referrer_policy-0.1.tar.gz
Algorithm Hash digest
SHA256 8b016946877f15b2b4d96a3fcee6869ccb81b6812bac33d116093ac023f148d4
MD5 86357e32d3a2f67d7a8170734a3d1ba5
BLAKE2b-256 1e660d32995727cd384ca0881dc0615445435bce1fe6e8ec5b801520fcf4efdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasette_referrer_policy-0.1.tar.gz:

Publisher: publish.yml on datasette/datasette-referrer-policy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datasette_referrer_policy-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_referrer_policy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 949dbe682fe3c9f377757afc281d28e5e210721132061ed8c2a9473dd2090bdf
MD5 ba27d4e68b0e038e3076879d8f116fc5
BLAKE2b-256 01fb921b41e948cac4be1a98b1d8b371cff44f6944ceacc87c4716f346ac1bba

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasette_referrer_policy-0.1-py3-none-any.whl:

Publisher: publish.yml on datasette/datasette-referrer-policy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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