mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-06-29 12:43:03 +00:00
fix: remove auth token from /api/command
This commit is contained in:
parent
e2e1e49130
commit
d5b39a14fd
@ -1,6 +1,6 @@
|
||||
import { removePrefix } from "./utils";
|
||||
import { baseURL } from "@/utils/constants";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { baseURL } from "@/utils/constants";
|
||||
import { removePrefix } from "./utils";
|
||||
|
||||
const ssl = window.location.protocol === "https:";
|
||||
const protocol = ssl ? "wss:" : "ws:";
|
||||
@ -14,7 +14,7 @@ export default function command(
|
||||
const authStore = useAuthStore();
|
||||
|
||||
url = removePrefix(url);
|
||||
url = `${protocol}//${window.location.host}${baseURL}/api/command${url}?auth=${authStore.jwt}`;
|
||||
url = `${protocol}//${window.location.host}${baseURL}/api/command${url}`;
|
||||
|
||||
const conn = new window.WebSocket(url);
|
||||
conn.onopen = () => conn.send(command);
|
||||
|
Loading…
x
Reference in New Issue
Block a user