We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RT
The text was updated successfully, but these errors were encountered:
void set_cors(http::web_request& req, auto& res) { if (m_config.enable_cors) { res.set("Access-Control-Allow-Headers", "x-requested-with,Content-Type,Authorization"); res.set("Access-Control-Allow-Methods", "POST,GET"); if (auto it = req.find(http::field::origin); it != req.end()) res.set("Access-Control-Allow-Origin", it->value()); } }
上面是我用的一段示例代码,想直接设置一个选项就支持跨域的,没有这个功能
Sorry, something went wrong.
No branches or pull requests
RT
The text was updated successfully, but these errors were encountered: