Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

roughrider.cors

This package allows you to create a policy that can handle CORS. It can be used with any python framework as it’s totally agnostic. It can cook response headers, even for preflight requests.

Example

from roughrider.cors.policy import CORSPolicy

cors = CORSPolicy(
    methods=['GET', 'POST'],
    allow_headers=['Accept-Encoding'],
    expose_headers=['Accept-Encoding'],
    max_age=19000
)

headers = list(cors.headers())

# Arguments for the preflight should be extracted from the request.
# depending on the type of framework you use (WSGI, ASGI...)
preflight_headers = list(cors.preflight(
    origin='http://example.com',
    acr_headers='X-Custom-Header, Accept-Encoding'
))

CHANGES

0.1 (2021-10-09)

  • Initial release.

Metadata

Release files for roughrider.cors 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roughrider.cors 0.1
File Size Uploaded Provenance Actions
roughrider.cors-0.1.tar.gz 5.9 kB Without provenance Details for roughrider.cors-0.1.tar.gz

Release files / roughrider.cors-0.1.tar.gz

Download URL roughrider.cors-0.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c65717ba70830008551f4b9f0910025cef01b5d378c15e7eae408f5e80e36eaf
BLAKE2b-256 checksum
How to use checksums
bdd513ad173e5cbdc5c31a182f45cd0de95a7d8d235cf344cd407772d7ab49e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Security for roughrider.cors 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page