mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
[web] make it possible to run static viewer in subdirectories
This commit is contained in:
parent
721f7cc92e
commit
58642d57f6
@ -56,7 +56,7 @@ describe('save', () => {
|
||||
global.fetch = jest.fn()
|
||||
store.dispatch(OptionsActions.save())
|
||||
expect(fetch).toBeCalledWith(
|
||||
'/options/save?_xsrf=undefined',
|
||||
'./options/save?_xsrf=undefined',
|
||||
{
|
||||
credentials: "same-origin",
|
||||
method: "POST"
|
||||
|
@ -91,6 +91,9 @@ export function fetchApi(url, options={}) {
|
||||
} else {
|
||||
url += '.json'
|
||||
}
|
||||
if (url.startsWith("/")) {
|
||||
url = "." + url;
|
||||
}
|
||||
|
||||
return fetch(url, {
|
||||
credentials: 'same-origin',
|
||||
|
Loading…
Reference in New Issue
Block a user