diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-12-02 09:22:17 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-12-02 09:22:17 +0200 |
| commit | 0d7162dc10009c21d4a8604265a67fe5750dc7aa (patch) | |
| tree | d0e8965d18fbd4bea008070605cb19d1a959debc | |
| parent | 0bf4d6deea179cbc3caa70ae64f4ce0460a7ef3d (diff) | |
| parent | f5461a6a078e127c7bf45b331bf64771945125ae (diff) | |
| download | monzero-core-0d7162dc10009c21d4a8604265a67fe5750dc7aa.tar.gz monzero-core-0d7162dc10009c21d4a8604265a67fe5750dc7aa.tar.xz monzero-core-0d7162dc10009c21d4a8604265a67fe5750dc7aa.zip | |
Merge pull request #2830
f5461a6a RPC: CORS add Access-Control-Allow-Headers to OPTIONS preflight (Tim L)
| -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"; } } |
