fix: no-cache headers on config+download endpoints, cache-bust config fetch from frontend
This commit is contained in:
@@ -264,7 +264,9 @@ async function loadOnlyofficeTemplates() {
|
||||
async function openOnlyofficeEditor(templateId, templateName) {
|
||||
try {
|
||||
// Get the JWT-signed editor config from our backend
|
||||
const resp = await fetch(ONLYOFFICE_API + '/' + templateId + '/config');
|
||||
// Add cache-buster to prevent browser caching the old config
|
||||
const cacheBuster = Date.now();
|
||||
const resp = await fetch(ONLYOFFICE_API + '/' + templateId + '/config?cb=' + cacheBuster);
|
||||
if (!resp.ok) {
|
||||
const err = await resp.json();
|
||||
throw new Error(err.error || 'Failed to get editor config');
|
||||
|
||||
Reference in New Issue
Block a user