mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-28 16:36:27 -08:00
add cor
This commit is contained in:
parent
0f962d81e2
commit
3b4fba797d
|
@ -180,6 +180,7 @@ app.get("/download/:fileId",(req,res) => {
|
||||||
let fgRQH = async (req:express.Request,res:express.Response) => {
|
let fgRQH = async (req:express.Request,res:express.Response) => {
|
||||||
|
|
||||||
let file = files.getFilePointer(req.params.fileId)
|
let file = files.getFilePointer(req.params.fileId)
|
||||||
|
res.setHeader("Access-Control-Allow-Origin", "*")
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
|
|
||||||
|
@ -242,7 +243,7 @@ let fgRQH = async (req:express.Request,res:express.Response) => {
|
||||||
|
|
||||||
let fgwh = (req: express.Request, res:express.Response) => {
|
let fgwh = (req: express.Request, res:express.Response) => {
|
||||||
let file = files.getFilePointer(req.params.fileId)
|
let file = files.getFilePointer(req.params.fileId)
|
||||||
|
res.setHeader("Access-Control-Allow-Origin", "*")
|
||||||
if (!file) {
|
if (!file) {
|
||||||
res.status(404)
|
res.status(404)
|
||||||
res.send()
|
res.send()
|
||||||
|
|
Loading…
Reference in a new issue