IlhamTahir 1 yıl önce
ebeveyn
işleme
398a09ad83
2 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 1 0
      .env.example
  2. 1 0
      src/main.ts

+ 1 - 0
.env.example

@@ -20,3 +20,4 @@ COS_SECRET_ID=yourid
 COS_SECRET_KEY=yourkey
 COS_REGION=ap-guangzhou
 COS_BUCKET=examplebucket-1250000000
+SERVER_PREFIX=/

+ 1 - 0
src/main.ts

@@ -19,6 +19,7 @@ async function bootstrap() {
       .addBearerAuth()
       .build();
     const document = SwaggerModule.createDocument(app, config);
+    document.servers = [{ url: process.env.SERVER_PREFIX }];
     SwaggerModule.setup('docs', app, document, {
       jsonDocumentUrl: 'docs/json',
     });