Skip to main content

Falcon cross-origin middleware

Project description

falcon-crossorigin codecov

A simple Falcon module for Cross-Origin Resource Sharing (CORS).

Install

pip install falcon-crossorigin

Usage

import falcon
from falcon_crossorigin import CrossOrigin

cross_origin = CrossOrigin(
    allow_origins="https://app.example.com",
    allow_methods="GET,POST",
    allow_headers="Pragma,Expires,Cache-Control",
    allow_credentials=True,
    expose_headers="Link",
    max_age=3600,
)

api = falcon.API(middleware=[cross_origin])

Credits

Port of Echo's CORS middleware.

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

falcon-crossorigin-1.0.0.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

falcon_crossorigin-1.0.0-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

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