diff options
author | Tim L <timo614@gmail.com> | 2017-11-16 12:33:31 -0500 |
---|---|---|
committer | Tim L <timo614@gmail.com> | 2017-11-16 13:56:16 -0500 |
commit | f5461a6a078e127c7bf45b331bf64771945125ae (patch) | |
tree | 8658ba7c2df34dd8b3c1536bf5365c4f9e4dbc42 /contrib/epee | |
parent | Merge pull request #2818 (diff) | |
download | monero-f5461a6a078e127c7bf45b331bf64771945125ae.tar.xz |
RPC: CORS add Access-Control-Allow-Headers to OPTIONS preflight
Diffstat (limited to 'contrib/epee')
-rw-r--r-- | contrib/epee/include/net/http_protocol_handler.inl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl index c3350bf73..c555707ac 100644 --- a/contrib/epee/include/net/http_protocol_handler.inl +++ b/contrib/epee/include/net/http_protocol_handler.inl @@ -639,6 +639,9 @@ namespace net_utils buf += "Access-Control-Allow-Origin: "; buf += m_query_info.m_header_info.m_origin; 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"; } } |