add trust proxy real quick $respect$$
This commit is contained in:
parent
3ad5705dd0
commit
79789265c8
1 changed files with 3 additions and 0 deletions
|
|
@ -16,6 +16,9 @@ app.use(
|
||||||
cors()
|
cors()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (process.env.TRUST_PROXY) {
|
||||||
|
app.set("trust proxy", true);
|
||||||
|
}
|
||||||
app.options("*path", (req, res) => {
|
app.options("*path", (req, res) => {
|
||||||
res.set("Access-Control-Allow-Origin", "*");
|
res.set("Access-Control-Allow-Origin", "*");
|
||||||
res.set("Access-Control-Allow-Methods", "GET,POST,OPTIONS");
|
res.set("Access-Control-Allow-Methods", "GET,POST,OPTIONS");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue