2
0

fix(auth): 🐛 Attempt to fix auth issue behind proxy

This commit is contained in:
Baptiste Arnaud
2022-03-10 15:16:44 +01:00
parent 5228cff468
commit 30fe7b3db0

View File

@ -49,6 +49,10 @@ if (process.env.FACEBOOK_CLIENT_ID && process.env.FACEBOOK_CLIENT_SECRET)
)
const handler = (req: NextApiRequest, res: NextApiResponse) => {
if (req.method === 'HEAD') {
res.status(200)
return
}
NextAuth(req, res, {
adapter: CustomAdapter(prisma),
secret: process.env.ENCRYPTION_SECRET,