Changed CORS options.

This commit is contained in:
Naida Vatric
2020-02-18 13:35:56 +01:00
parent 57329b0311
commit 17f0e6443c
2 changed files with 5 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ app.get("/generateSignedURL", (req, res) => {
const [url] = await bucket.file(filename).getSignedUrl(options); const [url] = await bucket.file(filename).getSignedUrl(options);
console.log(`The signed url for ${filename} is ${url}.`); console.log(`The signed url is ${url}.`);
res.send(url); res.send(url);
} }
generateSignedUrl().catch(console.error); generateSignedUrl().catch(console.error);

View File

@@ -1,8 +1,8 @@
[ [
{ {
"maxAgeSeconds": 3600, "origin": ["http://localhost"],
"method": ["*"], "responseHeader": ["Content-Type"],
"origin": ["*"], "method": ["GET", "HEAD", "DELETE"],
"responseHeader": ["*"] "maxAgeSeconds": 3600
} }
] ]