Skip to content

Commit 3b34d02

Browse files
Add credentials to stop and reset requests
1 parent 0f80721 commit 3b34d02

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Diff for: locust/webui/src/components/StateButtons/ResetButton.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import { Button } from '@mui/material';
22

33
export default function ResetButton() {
44
const onResetStatsClick = () => {
5-
fetch((window.baseUrl ? `${window.baseUrl}/` : '') + 'stats/reset');
5+
fetch(
6+
(window.baseUrl ? `${window.baseUrl}/` : '') + 'stats/reset',
7+
window.baseUrl ? { credentials: 'include' } : undefined,
8+
);
69
};
710

811
return (

Diff for: locust/webui/src/components/StateButtons/StopButton.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export default function StopButton() {
99
}, []);
1010

1111
const onStopButtonClick = () => {
12-
fetch((window.baseUrl ? `${window.baseUrl}/` : '') + 'stop');
12+
fetch(
13+
(window.baseUrl ? `${window.baseUrl}/` : '') + 'stop',
14+
window.baseUrl ? { credentials: 'include' } : undefined,
15+
);
1316
setIsLoading(true);
1417
};
1518

0 commit comments

Comments
 (0)