Allowing proxying for secure cookies.
This commit is contained in:
parent
450fcfeb5a
commit
8e1ead37e6
1
.gitignore
vendored
1
.gitignore
vendored
@ -165,3 +165,4 @@ dist
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,node
|
||||
|
||||
**/server/public/**
|
@ -18,7 +18,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "NODE_ENV='development' REACT_APP_API_HOST='http://localhost:5000' react-scripts start",
|
||||
"build": "../scripts/build.py",
|
||||
"build": "python3 ../scripts/build.py",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
|
2
sports-matcher/scripts/build.py
Normal file → Executable file
2
sports-matcher/scripts/build.py
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
@ -14,6 +14,7 @@ const sessionConf = {
|
||||
};
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
sessionConf.cookie.secure = true;
|
||||
sessionConf.proxy = true;
|
||||
sessionConf.store = MongoStore.create({ mongoUrl: mongoURI, dbName: mongooseDbName });
|
||||
}
|
||||
export const userSession = session(sessionConf);
|
||||
|
Loading…
Reference in New Issue
Block a user