diff --git a/controller/action/i18nActions.class.php b/controller/action/i18nActions.class.php index 9526c9c9..dfd490a1 100644 --- a/controller/action/i18nActions.class.php +++ b/controller/action/i18nActions.class.php @@ -26,9 +26,11 @@ class i18nActions extends Actions public static function executeServeTranslationFile(string $project, string $resource, string $language) { if (!Transifex::isConfigured()) { - throw new Exception('Please set Config::TRANSIFEX_API_KEY in your configuration.'); + throw new Exception('Please set Config::TRANSIFEX_API_KEY in your configuration.'); } + Response::setHeader(Response::HEADER_CROSS_ORIGIN, "*"); + return View::renderJson(Transifex::getTranslationResourceFile($project, $resource, $language)); } }