diff --git a/webclient/config.js b/webclient/config.js index 5dce38257..011ae815c 100644 --- a/webclient/config.js +++ b/webclient/config.js @@ -13,6 +13,6 @@ export const configRelease = { export const configLocal = { app_prefix: "", - cdn_prefix: "/cdn/", - api_prefix: "http://localhost:8080/api/", + cdn_prefix: "https://nav.tum.de/cdn/", + api_prefix: "https://nav.tum.de/api/", }; diff --git a/webclient/src/feedback.js b/webclient/src/feedback.js index 2e47419b2..71ccb9f31 100644 --- a/webclient/src/feedback.js +++ b/webclient/src/feedback.js @@ -60,7 +60,7 @@ window.feedback = (() => { if (r.status === 201) { token = { creation: Date.now(), - value: JSON.parse(r.response).token, + value: r.response.replace(/^"(.*)"$/, '$1'), }; if (navigatum) navigatum.setLocalStorageWithExpiry("feedback-token", token, 6); @@ -170,6 +170,9 @@ window.feedback = (() => { const invalidTokenError = "${{_.feedback.error.send_invalid_token}}$"; _showError(`${invalidTokenError} (${r.responseText})`, false); } else { + // we reset the token here to be sure that it is the cause of the error + localStorage.removeItem("feedback-token"); + token = null; const unexpectedStatusError = "${{_.feedback.error.send_unexpected_status}}$"; _showError(`${unexpectedStatusError}${r.status}`, false);