- Add Dockerfile, docker-compose.yml, .dockerignore for containerised deployment - Add deploy/ scripts (deploy.sh, nginx/apache configs, password generator) - Replace MSAL/Azure AD auth with local username/password authentication - Add login.html template - Simplify app.py, middleware, and auth routes for production use - Update gunicorn_config.py and wsgi.py for Docker/production - Update templates to work with new auth and URL prefix handling Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
615 B
JavaScript
20 lines
615 B
JavaScript
/**
|
|
* Minimal auth handler — logout button only.
|
|
* Server-side session auth handles all gating via redirects.
|
|
*/
|
|
(function() {
|
|
const logoutBtn = document.getElementById('logoutBtn');
|
|
if (logoutBtn) {
|
|
logoutBtn.addEventListener('click', async () => {
|
|
try {
|
|
await fetch(window.BASE_URL + '/auth/logout', {
|
|
method: 'POST',
|
|
credentials: 'include'
|
|
});
|
|
} catch (e) {
|
|
// ignore
|
|
}
|
|
window.location.href = window.BASE_URL + '/auth/login-page';
|
|
});
|
|
}
|
|
})();
|