forked from MapComplete/MapComplete
Offline: add CORS
This commit is contained in:
parent
5b726cc190
commit
fc53e119ea
1 changed files with 2 additions and 1 deletions
|
@ -65,7 +65,8 @@ class ServerPmTileExtracts extends Script {
|
|||
if(req.destroyed){
|
||||
return null
|
||||
}
|
||||
res.writeHead(200, { "Content-Type": "application/octet-stream" })
|
||||
const origin = req.headers.origin
|
||||
res.writeHead(200, { "Content-Type": "application/octet-stream" , "Access-Control-Allow-Origin": origin})
|
||||
Server.sendFile(targetFile, res)
|
||||
|
||||
return null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue