mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-04 06:54:39 -04:00
SkyMap: Fix CORS and enabling caching.
This commit is contained in:
@@ -97,7 +97,7 @@ void WebServer::addFile(const QString &path, const QByteArray &data)
|
||||
|
||||
void WebServer::sendFile(QTcpSocket* socket, const QByteArray &data, MimeType *mimeType, const QString &path)
|
||||
{
|
||||
QString header = QString("HTTP/1.0 200 Ok\r\nContent-Type: %1\r\nAccess-Control-Allow-Origin \"*\"\r\n\r\n").arg(mimeType->m_type);
|
||||
QString header = QString("HTTP/1.0 200 Ok\r\nContent-Type: %1\r\nAccess-Control-Allow-Headers: *\r\nAccess-Control-Allow-Methods: *\r\nAccess-Control-Allow-Origin: *\r\n\r\n").arg(mimeType->m_type);
|
||||
if (mimeType->m_binary)
|
||||
{
|
||||
// Send file as binary
|
||||
|
||||
Reference in New Issue
Block a user