Skip to content

CORS wildcard origin breaks with CORSMiddleware when using Tor #385

@shroominic

Description

@shroominic

When `cors_origins` contains `""`, FastAPI's `CORSMiddleware` doesn't handle it correctly for Tor .onion origins. The wildcard needs to be converted to `allow_origin_regex="."` while keeping explicit origins in the list.

File: `routstr/core/main.py`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions