Skip to content

Commit e3c62af

Browse files
authored
feat: Avoid loading cached GET responses on the frontend (higress-group#314)
1 parent 76e9cf1 commit e3c62af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

frontend/src/services/request.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ request.interceptors.request.use((config) => {
1919
...config.headers,
2020
};
2121
}
22+
if (config.method && config.method.toUpperCase() == 'GET' && config.url) {
23+
config.url = `${config.url}${config.url.indexOf('?') === -1 ? '?' : '&'}ts=${Date.now()}`;
24+
}
2225
return config;
2326
});
2427

0 commit comments

Comments
 (0)