Skip to content

Commit ec044c3

Browse files
committed
fix: include token for engine requests only
1 parent 416ff70 commit ec044c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib/interceptors/DefaultRequestInterceptor.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ export async function DefaultRequestInterceptor(config: InternalAxiosRequestConf
1010
config.headers.Accept = 'application/json'
1111
}
1212

13-
const token = await getUserToken()
14-
if (token) {
15-
config.headers.Authorization = `Bearer ${token}`
13+
if (config.url?.startsWith('/engine/')) {
14+
const token = await getUserToken()
15+
if (token) {
16+
config.headers.Authorization = `Bearer ${token}`
17+
}
1618
}
1719
}
1820

0 commit comments

Comments
 (0)