{"id":15432879,"url":"https://github.com/simonw/datasette-redirect-to-https","last_synced_at":"2026-05-19T19:10:29.984Z","repository":{"id":62566820,"uuid":"430224716","full_name":"simonw/datasette-redirect-to-https","owner":"simonw","description":"Datasette plugin that redirects all non-https requests to https","archived":false,"fork":false,"pushed_at":"2022-07-07T17:38:32.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-02T09:47:09.171Z","etag":null,"topics":["asgi","datasette","datasette-io","datasette-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-20T22:43:33.000Z","updated_at":"2025-06-23T23:02:06.000Z","dependencies_parsed_at":"2022-11-03T16:16:02.798Z","dependency_job_id":null,"html_url":"https://github.com/simonw/datasette-redirect-to-https","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"simonw/datasette-plugin-template-repository","purl":"pkg:github/simonw/datasette-redirect-to-https","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-redirect-to-https","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-redirect-to-https/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-redirect-to-https/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-redirect-to-https/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/datasette-redirect-to-https/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-redirect-to-https/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266961954,"owners_count":24012990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asgi","datasette","datasette-io","datasette-plugin"],"created_at":"2024-10-01T18:28:57.873Z","updated_at":"2026-05-19T19:10:29.925Z","avatar_url":"https://github.com/simonw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# datasette-redirect-to-https\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-redirect-to-https.svg)](https://pypi.org/project/datasette-redirect-to-https/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-redirect-to-https?include_prereleases\u0026label=changelog)](https://github.com/simonw/datasette-redirect-to-https/releases)\n[![Tests](https://github.com/simonw/datasette-redirect-to-https/workflows/Test/badge.svg)](https://github.com/simonw/datasette-redirect-to-https/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-redirect-to-https/blob/main/LICENSE)\n\nDatasette plugin that redirects all non-https requests to https\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n\n    $ datasette install datasette-redirect-to-https\n\n## Usage\n\nOnce installed, incoming GET requests to the `http://` protocol will be 301 redirected to the `https://` equivalent page.\n\nHTTP verbs other than GET will get a 405 Method Not Allowed HTTP error.\n\n## Configuration\n\nSome hosting providers handle HTTPS for you, passing requests back to your application server over HTTP.\n\nFor this plugin to work correctly, it needs to detect that the original incoming request came in over HTTP.\n\nHosting providers like this often set an additional HTTP header such as `x-forwarded-proto: http` identifying the original protocol.\n\nYou can configure `datasette-redirect-to-https` to respect this header using the following plugin configuration in `metadata.json`:\n\n```json\n{\n  \"plugins\": {\n    \"datasette-redirect-to-https\": {\n      \"if_headers\": {\n        \"x-forwarded-proto\": \"http\"\n      }\n    }\n  }\n}\n```\nThe above example will redirect to `https://` if the incoming request has a `x-forwarded-proto: http` request header.\n\nIf multiple `if_headers` are listed, the redirect will occur if any of them match.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n\n    cd datasette-redirect-to-https\n    python3 -m venv venv\n    source venv/bin/activate\n\nNow install the dependencies and test dependencies:\n\n    pip install -e '.[test]'\n\nTo run the tests:\n\n    pytest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fdatasette-redirect-to-https","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fdatasette-redirect-to-https","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fdatasette-redirect-to-https/lists"}