added cors origin

This commit is contained in:
srgooglo 2022-08-04 11:56:22 +02:00
parent bba2e31a6b
commit 3336107811

View File

@ -343,6 +343,11 @@ class StreamingServer {
initialize = async () => { initialize = async () => {
await this.Db.connect() await this.Db.connect()
// fix cors
this.IHTTPServer.httpInterface.options("*", require("cors")({
origin: "localhost"
}))
await this.IHTTPServer.initialize() await this.IHTTPServer.initialize()
await this.IMediaServer.run() await this.IMediaServer.run()
} }