diff --git a/configs/monero-block-explorer.json b/configs/monero-block-explorer.json index c30d2d1..520cf71 100644 --- a/configs/monero-block-explorer.json +++ b/configs/monero-block-explorer.json @@ -1,7 +1,8 @@ { "extensions": [ "core/monero.json", - "blockchain-explorer.json" + "blockchain-explorer.json", + "enable-cors.json" ], "base_coin": { "name": "monero", diff --git a/extensions/enable-cors.json b/extensions/enable-cors.json new file mode 100644 index 0000000..4c3a9c5 --- /dev/null +++ b/extensions/enable-cors.json @@ -0,0 +1,23 @@ +{ + "file": "enable-cors.json", + "description": "Adds CORS support", + "required": [ + "core/monero.json" + ], + "files": [ + { + "path": "/contrib/epee/include/net/http_server_handlers_map2.h", + "changes": [ + { + "action": "add_above", + "marker": "response.m_response_comment = \"Ok\"; \\", + "parameters": { + "text": [ + " response.m_additional_fields.push_back(std::make_pair(\"Access-Control-Allow-Origin\", \"*\")); " + ] + } + } + ] + } + ] +} \ No newline at end of file