Use cookie auth instead of header as GCP uses the Authorization header

This commit is contained in:
Jackson Harper 2023-01-05 20:17:43 +08:00
parent 24763669b3
commit 88b6fcfb5d
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ export function userRouter() {
res.status(401).send('UNAUTHORIZED')
return
}
const from = process.env.SENDER_MESSAGE
const from = env.sender.message
const { body, subject } = req.body as {
body?: string
subject?: string

View file

@ -66,7 +66,7 @@ const createEmailCloudTask = async (userId: string, payload: unknown) => {
process.env.JWT_SECRET
)) as string
const headers = {
Authorization: authToken,
Cookie: `auth=${authToken}`,
}
return createCloudTask(EMAIL_USER_URL, payload, headers)