宏
宏
例如
let cors = CorsLayer::new()
        .allow_origin(
            #[cfg(debug_assertions)]
            Any,
            
            #[cfg(not(debug_assertions))]
            [
                "http://localhost".parse::<HeaderValue>().unwrap(),
                "http://localhost:3060".parse::<HeaderValue>().unwrap(),
            ]
        ) // Any 允许任意来源,开发阶段可用,生产建议指定域名
        ...链接到当前文件 0
没有文件链接到当前文件