Fix: WebUI port switch reconnect

The WebUI will get now the new port for next reconnect
It was necessary to add the Access-Control-Allow-Origin header with a wildcard for file serving
This commit is contained in:
brindosch
2019-07-18 22:32:06 +02:00
parent fcd11176f8
commit 7e324bb1d3
6 changed files with 26 additions and 15 deletions

View File

@@ -135,6 +135,7 @@ void StaticFileServing::onRequestNeedsReply (QtHttpRequest * request, QtHttpRepl
if (file.open (QFile::ReadOnly)) {
QByteArray data = file.readAll ();
reply->addHeader ("Content-Type", mime.name ().toLocal8Bit ());
reply->addHeader(QtHttpHeader::AccessControlAllow, "*" );
reply->appendRawData (data);
file.close ();
}