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);
|
||||
|
||||
console.log(`The signed url for ${filename} is ${url}.`);
|
||||
console.log(`The signed url is ${url}.`);
|
||||
res.send(url);
|
||||
}
|
||||
generateSignedUrl().catch(console.error);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"maxAgeSeconds": 3600,
|
||||
"method": ["*"],
|
||||
"origin": ["*"],
|
||||
"responseHeader": ["*"]
|
||||
"origin": ["http://localhost"],
|
||||
"responseHeader": ["Content-Type"],
|
||||
"method": ["GET", "HEAD", "DELETE"],
|
||||
"maxAgeSeconds": 3600
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user