3PillarGlobal-Czechia / interview-app-api

API for Interview App.
MIT License
3 stars 1 forks source link

Bug: swagger extension is not working in production mode #37

Closed PlesnikJakub closed 2 years ago

PlesnikJakub commented 2 years ago

When the application is deployed to the DEV environment swagger extension is not working due to the incorrect base path for endpoints.

Note: even its DEV environment asp.net env is "production" mode and this causes issue sin swaggerextension.cs to use incorrect path.

PlesnikJakub commented 2 years ago

@TerezaSkutova in src\WebApi\WebApi\Modules\SwaggerExtension.cs you can get fid off conditions inside for each loop. We don't have a reverse proxy so far, which means only the option currently in the first block of the condition should be used.

PlesnikJakub commented 2 years ago

Original behavior should be reproducible locally by changing ASPNETCORE_ENVIRONMENT. In VS code in the context menu, under the run option, go to WebApiDebug properties, and there you can edit launch profiles and set "production".

Let me know if that works 😊

image

TerezaSkutova commented 2 years ago

@PlesnikJakub It works perfectly. Thank you for that hint!