diff options
Diffstat (limited to 'src/HttpServer.cc')
| -rw-r--r-- | src/HttpServer.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 31893c95..9d3eaaa7 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -165,6 +165,9 @@ void HttpServer::feedResponse(const std::string& status, strappend(header, "Content-Length: ", util::uitos(text.size()), "\r\n", "Expires: ", httpDate, "\r\n", "Cache-Control: no-cache\r\n"); + if(!allowOrigin_.empty()) { + strappend(header, "Access-Control-Allow-Origin: ", allowOrigin_, "\r\n"); + } if(supportsGZip()) { header += "Content-Encoding: gzip\r\n"; } |
