ABP Framework version: v7.2.0
UI Type: Angular
Database System: EF Core ( MySQL)
Tiered (for MVC) or Auth Server Separated (for Angular): yes, Auth server separated
Exception message and full stack trace: Errors Fetch error Failed to fetch https://localhost/swagger/v1/swagger.json Fetch error Possible cross-origin (CORS) issue? The URL origin (https://localhost) does not match the page (http://20.219.83.230:44325). Check the server returns the correct 'Access-Control-Allow-*' headers.
Steps to reproduce the issue: host the application on docker after hosting WebGateay on docker getting these error.
6 Answer(s)
-
0
This is a known issue,
We are working on a better way to handle swagger ui for gateways in microservice solutions.
The problem you come across is related to the swagger ui configuration. Currently, we are adding
microservice.swagger.json
files as definitions. However these endpoints are located based on the gateway routes. Since the gateways have internal service names for routing, it fails when the application is served on the browser.I've refunded your credit, we're working on a solution to handle swagger ui in gateways.
-
0
whats the work around and Expected date of release?
-
0
whats the work around and Expected date of release?
We don't have a workaround yet, we are working on it. So, there is no release date for it yet. But you can add your custom solution based on the gateway you are using.
-
0
In this case how i'm supposed to host my application? if i have to implement custom solution why i would purchase abp framework.
-
0
Hi,
I think you misunderstand it, there is no problem with hosting or functionality of the gateway. The current behavior is showing the api definitions of the other microservices. It is exactly the same with the microservice swagger UI. You can use the microservice itself for the swagger UI, that works fine in any environment. The problem is related to the gateway swagger UI api definitions.
-
0
I have created a workaround for this problem, it should be available in the next patch.
That being said, we're planning major changes on gateway swagger UI in the future for better production environment coverage.