Fix fetch URL resolution when served under a subpath
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: m1730-generator
|
||||
image: git.baumann.gr/adebaumann/m1730-generator:0.2
|
||||
image: git.baumann.gr/adebaumann/m1730-generator:0.3
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
|
||||
@@ -177,7 +177,8 @@
|
||||
const status = document.getElementById('status');
|
||||
status.textContent = 'Generating…';
|
||||
try {
|
||||
const resp = await fetch('generate', {
|
||||
const base = window.location.href.split('?')[0].replace(/\/?$/, '/');
|
||||
const resp = await fetch(base + 'generate', {
|
||||
method: 'POST',
|
||||
body: new FormData(document.getElementById('form')),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user