Skip to content

Node.js based forum software built for the modern web

fix: remove relative_path

Barış Soner Uşaklıf96dace127ba
diff --git a/public/src/modules/api.js b/public/src/modules/api.js
index 02f2ffd098..d76b124aca 100644
--- a/public/src/modules/api.js
+++ b/public/src/modules/api.js
@@ -13,7 +13,7 @@ async function call(options, callback) {
options.headers = options.headers || {};
if (!options.headers['x-return-to']) {
- options.headers['x-return-to'] = `${window.location.pathname}${window.location.search}`;
+ options.headers['x-return-to'] = `${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`;
}
if (typeof callback === 'function') {