1

Implematation: port 8099 has swagger ui which suppose to be route in kong but the output is empty when its route to kong.

Maybe this is the reason for blank page: its trying to get the html and css and etc. of the swagger.

- host: host.docker.internal
  port: 8099
  name: swagger-service
  path: /swagger-ui/index.html
  routes:
  - name: swagger-service
    paths:
    - /swagger
    strip_path: true

I tried re write https://docs.konghq.com/hub/stone-payments/kong-plugin-url-rewrite/ but still empty

- host: host.docker.internal
  port: 8099
  name: swagger-service
  url: /swagger-ui/index.html
  routes:
    - name: swagger-service
      plugins:
      - name: kong-plugin-url-rewrite
        config: 
          url: http://swagger

8099 port 8099 port route 8099 to kong empty page output route 8099 to kong

SpicySandwich
  • 49
  • 1
  • 10
  • This is a DNS issue, not a Kong one, your browser doesn't know how to resolve swagger as hostname. – Ôrel Jun 20 '22 at 19:34

1 Answers1

0

The issue here is that when you try to access your swagger url, the swagger will try to fetch the schema from the schema url using the same base url (the one exposed by kong), hence you will have a 404 since the schma url is not added as a route. A way to fix this is to add the schema url also as a route so that it can be accessible from your swagger route.

Saheed
  • 11
  • 1