Skip to content

Conversation

@jubnl
Copy link

@jubnl jubnl commented Dec 26, 2025

Useful for self host instances.

It will log out the CORS origins defined at startup.

Example:

.env:
CORS_ORIGINS=https://origin1.com,https://origin2.com
logs:

[2025-12-26T01:39:03Z INFO  vertd::http] CORS: allowed origins:
[2025-12-26T01:39:03Z INFO  vertd::http]   - https://origin1.com
[2025-12-26T01:39:03Z INFO  vertd::http]   - https://origin2.com

.env:
CORS_ORIGINS=*
logs:

[2025-12-26T01:54:45Z INFO  vertd::http] CORS: allow any origin (*)

.env with no CORS_ORIGINS key
logs:

[2025-12-26T01:55:55Z INFO  vertd::http] CORS: allow any origin (*)

CORS are enforced properly:
(running with CORS set to "example.com")
image

@jubnl jubnl changed the title Add a way to define CORS origins using environment variables feat: Add a way to define CORS origins using environment variables Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant