import config from '../base/config.mjs' import Parent from '../base/server.mjs' import ServeHandler from '../base/serve.mjs' import PageRoutes from '../base/page/routes.mjs' export default class Server extends Parent { init() { this.flaskaOptions.appendHeaders['Content-Security-Policy'] = `default-src 'self'; script-src 'self' talk.hyvor.com; style-src 'self' 'unsafe-inline'; img-src * data: blob:; font-src 'self' data:; object-src 'none'; iframe-src talk.hyvor.com` //; frame-ancestors 'none'` } addCustomRoutes() { let page = this.getRouteInstance(PageRoutes) let localUtil = new this.core.sc.Util(import.meta.url) this.routes.push(new ServeHandler({ pageRoutes: page, root: localUtil.getPathFromRoot('../public'), version: this.core.app.running, frontend: config.get('frontend:url'), })) } }