feat(http-request): add headers support
This commit is contained in:
@@ -9,7 +9,7 @@ const appInfoConverter = (rawAppData: IApp) => {
|
||||
|
||||
if (rawAppData.auth?.fields) {
|
||||
rawAppData.auth.fields = rawAppData.auth.fields.map((field) => {
|
||||
if (typeof field.value === 'string') {
|
||||
if (field.type === 'string' && typeof field.value === 'string') {
|
||||
return {
|
||||
...field,
|
||||
value: field.value.replace('{WEB_APP_URL}', appConfig.webAppUrl),
|
||||
|
@@ -47,6 +47,7 @@ export default function createHttpClient({
|
||||
if (
|
||||
// TODO: provide a `shouldRefreshToken` function in the app
|
||||
(status === 401 || status === 403) &&
|
||||
$.app.auth &&
|
||||
$.app.auth.refreshToken &&
|
||||
!$.app.auth.isRefreshTokenRequested
|
||||
) {
|
||||
|
Reference in New Issue
Block a user