fast-gateway icon indicating copy to clipboard operation
fast-gateway copied to clipboard

Swagger files are not accessible under gateway

Open mopcweb opened this issue 4 years ago • 0 comments
trafficstars

Hi! thanks for this lib!!

i have a problem with serving swagger UI under routes specified in fast-gateway.

steps to repoduce

gateway({
    prefix: '/test',
    target: `http://localhost:3022`,
    docs: {
      name: 'Docs',
      endpoint: '/api-docs/swagger.json',
      type: 'swagger',
    },
 }).start(3020);

and basic example server from here.

so when open browser at localhost:3022/api-docs - i'll see Swagger UI. but when open localhost:3020/test/api-docs - there are several errors:

image

Question - how can i serve swagger ui for projects under this gateway?

thanks

mopcweb avatar Apr 20 '21 00:04 mopcweb