aboutsummaryrefslogtreecommitdiff
path: root/src/lib.ts
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-07-08 15:19:32 +1000
committerTerry Truong <terry06890@gmail.com>2022-07-08 15:21:01 +1000
commit347f5127929b17671c75734af5a374ec4f39b5ae (patch)
treebae9b7464ae06b0b18a0c9460ba1e48254d754e4 /src/lib.ts
parent4e2830b6986aef2486d12c20ffc37d4bb595ced4 (diff)
Revert back to using vite-proxy for avoiding CORS issues
Diffstat (limited to 'src/lib.ts')
-rw-r--r--src/lib.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.ts b/src/lib.ts
index faec861..d737879 100644
--- a/src/lib.ts
+++ b/src/lib.ts
@@ -7,7 +7,7 @@ import {LayoutOptions} from './layout';
import {getBreakpoint, Breakpoint, getScrollBarWidth, onTouchDevice} from './util';
// For server requests
-const SERVER_URL = 'http://localhost:8000/cgi-bin/data.py'
+const SERVER_URL = window.location.href + 'cgi-bin/data.py'
export async function queryServer(params: URLSearchParams){
// Construct URL
let url = new URL(SERVER_URL);