fix: email sending and recommendation
* use token in the custom header as the key in rate limiter
This commit is contained in:
@ -12,7 +12,7 @@ import {
|
||||
CreateLabelInput,
|
||||
} from '../generated/graphql'
|
||||
import { signFeatureToken } from '../services/features'
|
||||
import { generateVerificationToken } from './auth'
|
||||
import { generateVerificationToken, OmnivoreAuthorizationHeader } from './auth'
|
||||
import { CreateTaskError } from './errors'
|
||||
import { buildLogger } from './logger'
|
||||
import View = google.cloud.tasks.v2.Task.View
|
||||
@ -432,7 +432,7 @@ export const enqueueRecommendation = async (
|
||||
}
|
||||
|
||||
const headers = {
|
||||
Cookie: `auth=${authToken}`,
|
||||
[OmnivoreAuthorizationHeader]: authToken,
|
||||
}
|
||||
// If there is no Google Cloud Project Id exposed, it means that we are in local environment
|
||||
if (env.dev.isLocal || !GOOGLE_CLOUD_PROJECT) {
|
||||
|
||||
Reference in New Issue
Block a user