zyket 1.1.10 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ module.exports = class Express extends Service {
|
|
|
33
33
|
|
|
34
34
|
const corsOptions = await this.#loadCorsOrCreateDefault();
|
|
35
35
|
|
|
36
|
-
this.#app.use(cors(corsOptions));
|
|
36
|
+
if(corsOptions) this.#app.use(cors(corsOptions));
|
|
37
37
|
|
|
38
38
|
// Swagger setup
|
|
39
39
|
const swaggerOptions = {
|
|
@@ -171,7 +171,7 @@ module.exports = class Express extends Service {
|
|
|
171
171
|
this.#container.get('logger').info("No CORS configuration found. Creating default config/cors.js");
|
|
172
172
|
fs.mkdirSync(path.join(process.cwd(), "config"), { recursive: true });
|
|
173
173
|
this.#container.get('template-manager').installFile('default/config/cors', corsConfigPath);
|
|
174
|
-
corsOptions =
|
|
174
|
+
corsOptions = false;
|
|
175
175
|
}
|
|
176
176
|
return corsOptions;
|
|
177
177
|
}
|