diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 86150c7..480968a 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -36,6 +36,10 @@ class PageController extends Controller $csp->allowEvalScript(true); $response = new TemplateResponse(Application::APP_ID, 'index'); + $response->setHeaders([ + 'Cross-Origin-Opener-Policy' => 'same-origin', + 'Cross-Origin-Embedder-Policy' => 'require-corp', + ]); $response->setContentSecurityPolicy($csp); return $response; diff --git a/src/main.ts b/src/main.ts index df9496c..c805105 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,7 +13,6 @@ import ar from '@emulatorjs/emulatorjs/data/localization/ar-AR.json' import ben from '@emulatorjs/emulatorjs/data/localization/ben-BEN.json' import de from '@emulatorjs/emulatorjs/data/localization/de-GER.json' import el from '@emulatorjs/emulatorjs/data/localization/el-GR.json' -import en from '@emulatorjs/emulatorjs/data/localization/en.json' import es from '@emulatorjs/emulatorjs/data/localization/es-ES.json' import fa from '@emulatorjs/emulatorjs/data/localization/fa-AF.json' import { getRequestToken } from '@nextcloud/auth' @@ -98,7 +97,6 @@ type Config = { | 'ben' | 'de' | 'el' - | 'en' | 'es' | 'fa' | 'hi' @@ -185,9 +183,6 @@ switch (document.documentElement.lang) { config.language = 'zh' config.langJson = zh break - default: - config.language = 'en' - config.langJson = en } interface EmulatorJS { @@ -316,7 +311,6 @@ if (system) { } config.dataPath = 'https://cdn.emulatorjs.org/stable/data/' -config.startOnLoad = true config.threads = !!window.SharedArrayBuffer // eslint-disable-next-line no-new