1
0
Fork 0

potential fix for login not working on production

This commit is contained in:
Kim, Jimin 2021-09-13 11:19:21 +09:00
parent 84bcda3f41
commit e47ab04eb8

View file

@ -22,10 +22,6 @@ admin.initializeApp({
const app = express()
app.use((_, res, next) => {
res.setHeader("Cache-Control", "private")
next()
})
app.use(
cors({ origin: ["https://llama.developomp.com", "http://localhost:5000"] })
)
@ -34,6 +30,15 @@ app.use(
)
app.use(passport.initialize())
app.use(passport.session())
app.use((_, res, next) => {
res.setHeader(
"Host",
process.env.FUNCTIONS_EMULATOR === "true"
? "http://localhost:5000"
: "https://llama.developomp.com"
)
next()
})
dataRoutes(app)
authRoutes(app)