mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
RPC: CORS add Access-Control-Allow-Headers to OPTIONS preflight
This commit is contained in:
parent
dc6a8014bd
commit
f5461a6a07
@ -639,6 +639,9 @@ namespace net_utils
|
|||||||
buf += "Access-Control-Allow-Origin: ";
|
buf += "Access-Control-Allow-Origin: ";
|
||||||
buf += m_query_info.m_header_info.m_origin;
|
buf += m_query_info.m_header_info.m_origin;
|
||||||
buf += "\r\n";
|
buf += "\r\n";
|
||||||
|
buf += "Access-Control-Expose-Headers: www-authenticate\r\n";
|
||||||
|
if (m_query_info.m_http_method == http::http_method_options)
|
||||||
|
buf += "Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With\r\n";
|
||||||
buf += "Access-Control-Allow-Methods: POST, PUT, GET, OPTIONS\r\n";
|
buf += "Access-Control-Allow-Methods: POST, PUT, GET, OPTIONS\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user