gateway.config.yml

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.3 kB
1
Indexable
Never
http:
  port: 8080
admin:
  port: 9876
  host: localhost
apiEndpoints:
  api:
    host: localhost
    paths: '/ip'
  dicoding:
    host: localhost
    paths: '/list'
  users: 
    host: "*"
    paths: '/user'
serviceEndpoints:
  httpbin:
    url: 'http://httpbin.org'
  dicodingbin:
    url: 'https://restaurant-api.dicoding.dev/'
  usersService:
    url : 'http://user:9920'
policies:
  - basic-auth
  - cors
  - expression
  - key-auth
  - log
  - oauth2
  - proxy
  - rate-limit
pipelines:
  defaultPipeline:
    apiEndpoints:
      - api
    policies:
    # Uncomment `key-auth:` when instructed to in the Getting Started guide.
    # - key-auth:
      - proxy:
          - action:
              serviceEndpoint: httpbin 
              changeOrigin: true
  dicodingPipeline:
    apiEndpoints:
      - dicoding
    policies:
    # Uncomment `key-auth:` when instructed to in the Getting Started guide.
    # - key-auth:
      - proxy:
          - action:
              serviceEndpoint: dicodingbin
              changeOrigin: true
  usersPipeline:
    apiEndpoints:
      - users
    policies:
    # Uncomment `key-auth:` when instructed to in the Getting Started guide.
    # - key-auth:
      - proxy:
          - action:
              serviceEndpoint: usersService
              changeOrigin: true