From 3035135d5f2f8a45d6053349fb9ef1761ac50d51 Mon Sep 17 00:00:00 2001 From: Tine Jozelj Date: Sun, 15 Jul 2018 16:24:01 +0200 Subject: [PATCH] fix: added https method to swager if in production --- example.env | 3 +++ src/api.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/example.env b/example.env index 477e262c..612315c8 100644 --- a/example.env +++ b/example.env @@ -1,3 +1,6 @@ +# ENV +NODE_ENV=develop + # APP APP_AUTHENTICATION=http://localhost:4200/authentication/callback diff --git a/src/api.ts b/src/api.ts index 67d5b4ea..93a3257d 100644 --- a/src/api.ts +++ b/src/api.ts @@ -32,6 +32,7 @@ async function bootstrap() { 'Additional Resources can be found on Github Wiki', 'https://github.com/evebook/api/wiki') .setVersion(process.env.npm_package_version) + .setSchemes(process.env.NODE_ENV === 'production' ? 'https' : 'http') .addTag('characters') .addTag('corporations') .addTag('alliances')