Open Closed

Docker hosting of WebGateway not loading. #5501


User avatar
0
smansuri created
  • 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)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    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.

  • User Avatar
    0
    smansuri created

    whats the work around and Expected date of release?

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    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.

  • User Avatar
    0
    smansuri created

    In this case how i'm supposed to host my application? if i have to implement custom solution why i would purchase abp framework.

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    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.

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    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.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38