-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/authenticate request #1101
base: develop
Are you sure you want to change the base?
Conversation
) { | ||
const response = await RequestClient.post<QuoteResponse>(`${getBaseUrl(isDev)}/quote`, { | ||
const url = `${getBaseUrl(isDev)}/quote`; | ||
const hash = apiKey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so when you have an api key you always compute the hash?
then why do we set the api key in the header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update to exclude api key header if there is a hash
json: payload, | ||
headers: apiKey ? { "x-api-key": apiKey } : {}, | ||
headers: { | ||
...(apiKey && !hash ? { "x-api-key": apiKey } : {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will always be false 😓
if we want to offer usage of apikey only. I would use referer as flag to compute the hash
No description provided.