Changed CORS options.
This commit is contained in:
2
index.js
2
index.js
@@ -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);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"maxAgeSeconds": 3600,
|
"origin": ["http://localhost"],
|
||||||
"method": ["*"],
|
"responseHeader": ["Content-Type"],
|
||||||
"origin": ["*"],
|
"method": ["GET", "HEAD", "DELETE"],
|
||||||
"responseHeader": ["*"]
|
"maxAgeSeconds": 3600
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user