feat(auth): add login audience middleware (EDRFREIGHT-415)

This commit is contained in:
Nathnael
2026-07-28 10:46:55 +00:00
parent 2d8b9203d5
commit e823874d39
12 changed files with 216 additions and 26 deletions

View File

@@ -25,6 +25,9 @@ axiosInstance.interceptors.request.use((config) => {
}
// X-Requested-With prevents CSRF via browser-native form/fetch without custom headers
config.headers["X-Requested-With"] = "XMLHttpRequest";
// Tells the backend which app is asking, so /auth/login can reject
// cross-audience credentials (EDRFREIGHT-415).
config.headers["X-Client-App"] = "backoffice";
return config;
});