Merge pull request #1618 from omnivore-app/fix/email-cookie-auth

Use cookie auth instead of header as GCP uses the Authorization header
This commit is contained in:
Jackson Harper 2023-01-05 20:53:09 +08:00 committed by GitHub
commit 18b26f9690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)