fix: remove upgrade-insecure-requests CSP, protect stratagems via API auth
This commit is contained in:
+3
-2
@@ -90,11 +90,12 @@ async function checkAuth() {
|
||||
}
|
||||
}
|
||||
|
||||
function onLoggedIn() {
|
||||
async function onLoggedIn() {
|
||||
document.getElementById('main-nav').classList.remove('hidden');
|
||||
document.getElementById('nav-username').textContent = state.user.user;
|
||||
document.getElementById('nav-admin').classList.toggle('hidden', state.user.role !== 'admin');
|
||||
state.stratagems = window.STRATAGEMS || [];
|
||||
// Stratagems are served via authenticated API – not as a public static file
|
||||
state.stratagems = await api('GET', '/stratagems').catch(() => []);
|
||||
connectWS();
|
||||
showView('dashboard');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user