Makes the webpack build use relative paths to allow for deploying on web subdirectories
Some checks are pending
build-docker / Build Image (push) Waiting to run
Some checks are pending
build-docker / Build Image (push) Waiting to run
This commit is contained in:
parent
f77bcbadb7
commit
ea8c3bf602
10 changed files with 74 additions and 36 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { rewriteUrl } from './url-rewrite.mjs';
|
||||
import { withBasePath } from './base-path.mjs';
|
||||
|
||||
// Clear cache utility for client-side use
|
||||
const clearCacheEntry = async (url, baseUrl = '') => {
|
||||
|
|
@ -15,7 +16,7 @@ const clearCacheEntry = async (url, baseUrl = '') => {
|
|||
}
|
||||
|
||||
// Call the cache clear endpoint
|
||||
const fetchUrl = baseUrl ? `${baseUrl}/cache${cachePath}` : `/cache${cachePath}`;
|
||||
const fetchUrl = baseUrl ? `${baseUrl}/cache${cachePath}` : withBasePath(`cache${cachePath}`);
|
||||
const response = await fetch(fetchUrl, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue