Feat(Security):

a. Update CORS settings
 b. Update session cookie settings
 c. Remove comments that expose project architecture (and that Claude made most of it :P)
This commit is contained in:
2025-01-25 14:31:03 +00:00
parent e7231cb67a
commit baa158fcd0
8 changed files with 25 additions and 54 deletions

View File

@@ -12,30 +12,11 @@ import PageLicense from './pages/legal/license.js';
// import PageUserLogout from './pages/user/logout.js';
// import PageUserAccount from './pages/user/account.js';
import API from './api.js';
import DOM from './dom.js';
import PagePrivacyPolicy from './pages/legal/privacy_policy.js';
import PageRetentionSchedule from './pages/legal/retention_schedule.js';
// Create a context for the pages
// const pagesContext = require.context('./pages', true, /\.js$/);
/*
const pageModules = {
// Core
[hashPageHome]: () => import('./pages/core/home.js'),
[hashPageContact]: () => import('./pages/core/contact.js'),
[hashPageServices]: () => import('./pages/core/services.js'),
[hashPageAdminHome]: () => import('./pages/core/admin_home.js'),
// Legal
[hashPageAccessibilityStatement]: () => import('./pages/legal/accessibility_statement.js'),
[hashPageLicense]: () => import('./pages/legal/license.js'),
// User
// Add other pages here...
};
*/
export default class Router {
constructor() {
@@ -146,11 +127,8 @@ export default class Router {
}
}
// Create and export a singleton instance
export const router = new Router();
// import this for navigation
// Usage example (you can put this in your main.js or app.js)
/*
router.addRoute('/', () => {
console.log('Home page');
@@ -162,7 +140,6 @@ router.addRoute('/about', () => {
// Load about page content
});
// Example of how to use the router in other parts of your application
export function setupNavigationEvents() {
document.querySelectorAll('a[data-nav]').forEach(link => {
link.addEventListener('click', (e) => {