aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/api/index.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-28 14:05:47 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit06d14f94a998ef795c52e7950e5cc8828464ae8e (patch)
treedc4f159e5b56d53c7748db0ad5202c605f8df6ec /vnext/src/api/index.js
parentd30ed659de70a2cd833a18c02005b5c9a3b84bd8 (diff)
Handle profile errors
Diffstat (limited to 'vnext/src/api/index.js')
-rw-r--r--vnext/src/api/index.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/vnext/src/api/index.js b/vnext/src/api/index.js
index aa0ddc6e..a6a6208c 100644
--- a/vnext/src/api/index.js
+++ b/vnext/src/api/index.js
@@ -71,10 +71,13 @@ const client = axios.create({
baseURL: apiBaseUrl
});
client.interceptors.request.use(config => {
- let cookies = new Cookies();
- config.params = Object.assign(config.params || {}, {
- hash: cookies.get('hash')
- });
+ if (config.url.startsWith('/')) {
+ // only local URLs
+ let cookies = new Cookies();
+ config.params = Object.assign(config.params || {}, {
+ hash: cookies.get('hash')
+ });
+ }
return config;
});