Skip to content
Discussion options

You must be logged in to vote

@masonsxu The current default setting is export RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*", which only supports setting ORIGINS and does not support setting method.

let cors_allowed_origins = std::env::var(rustfs_config::ENV_CONSOLE_CORS_ALLOWED_ORIGINS)

pub fn parse_cors_origins(origins: Option<&String>) -> CorsLayer {

.allow_methods([Method::GET, Method::POST, Method::PUT, Method::DELETE, Method::OPTIONS])

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@houseme
Comment options

Answer selected by masonsxu
@masonsxu
Comment options

@houseme
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants