docs: update config
This commit is contained in:
20
README.md
20
README.md
@@ -23,17 +23,19 @@ Simple, easy to use, and configure.
|
|||||||
- [Docker Hub](https://hub.docker.com/r/jkaninda/goma-gateway)
|
- [Docker Hub](https://hub.docker.com/r/jkaninda/goma-gateway)
|
||||||
- [Github](https://github.com/jkaninda/goma-gateway)
|
- [Github](https://github.com/jkaninda/goma-gateway)
|
||||||
|
|
||||||
|
## Documentation is found at <https://jkaninda.github.io/goma-gateway>
|
||||||
|
|
||||||
### Feature
|
### Feature
|
||||||
|
|
||||||
- [x] Reverse proxy
|
- [x] Reverse proxy
|
||||||
- [x] API Gateway
|
- [x] API Gateway
|
||||||
- [x] Domain/host based request routing
|
- [x] Domain/host based request routing
|
||||||
- [x] Multi domain request routing
|
- [x] Multi domain request routing
|
||||||
- [x] Cors
|
- [x] Cross-Origin Resource Sharing (CORS)
|
||||||
- [ ] Support TLS
|
- [ ] Support TLS
|
||||||
- [x] Backend errors interceptor
|
- [x] Backend errors interceptor
|
||||||
- [x] Authentication middleware
|
- [x] Authentication middleware
|
||||||
- [x] JWT `HTTP Bearer Token`
|
- [x] JWT ` client authorization based on the result of a request`
|
||||||
- [x] Basic-Auth
|
- [x] Basic-Auth
|
||||||
- [ ] OAuth
|
- [ ] OAuth
|
||||||
- [x] Implement rate limiting
|
- [x] Implement rate limiting
|
||||||
@@ -124,7 +126,7 @@ gateway:
|
|||||||
path: /public
|
path: /public
|
||||||
## Rewrite a request path
|
## Rewrite a request path
|
||||||
# e.g rewrite: /store to /
|
# e.g rewrite: /store to /
|
||||||
rewrite: /healthz
|
rewrite: /
|
||||||
destination: https://example.com
|
destination: https://example.com
|
||||||
#DisableHeaderXForward Disable X-forwarded header.
|
#DisableHeaderXForward Disable X-forwarded header.
|
||||||
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
||||||
@@ -155,8 +157,8 @@ gateway:
|
|||||||
- name: Authentication service
|
- name: Authentication service
|
||||||
path: /auth
|
path: /auth
|
||||||
rewrite: /
|
rewrite: /
|
||||||
destination: 'http://security-service:8080'
|
destination: https://example.com
|
||||||
healthCheck: /internal/health/ready
|
healthCheck: /
|
||||||
cors: {}
|
cors: {}
|
||||||
middlewares:
|
middlewares:
|
||||||
- api-forbidden-paths
|
- api-forbidden-paths
|
||||||
@@ -208,17 +210,17 @@ middlewares:
|
|||||||
#
|
#
|
||||||
# Add header to the next request from AuthRequest header, depending on your requirements
|
# Add header to the next request from AuthRequest header, depending on your requirements
|
||||||
# Key is AuthRequest's response header Key, and value is Request's header Key
|
# Key is AuthRequest's response header Key, and value is Request's header Key
|
||||||
# In case you want to get headers from the Authentication service and inject them into the next request's headers
|
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||||
headers:
|
headers:
|
||||||
userId: X-Auth-UserId
|
userId: X-Auth-UserId
|
||||||
userCountryId: X-Auth-UserCountryId
|
userCountryId: X-Auth-UserCountryId
|
||||||
# In case you want to get headers from the Authentication service and inject them to the next request's params
|
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
||||||
params:
|
params:
|
||||||
userCountryId: countryId
|
userCountryId: countryId
|
||||||
# The server will return 404
|
# The server will return 403
|
||||||
- name: api-forbidden-paths
|
- name: api-forbidden-paths
|
||||||
type: access
|
type: access
|
||||||
## Forbidden paths
|
## prevents access paths
|
||||||
paths:
|
paths:
|
||||||
- /swagger-ui/*
|
- /swagger-ui/*
|
||||||
- /v2/swagger-ui/*
|
- /v2/swagger-ui/*
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ email: hi@jonaskaninda.com
|
|||||||
description: >- # this means to ignore newlines until "baseurl:"
|
description: >- # this means to ignore newlines until "baseurl:"
|
||||||
Goma Gateway is a lightweight API Gateway and Reverse Proxy.
|
Goma Gateway is a lightweight API Gateway and Reverse Proxy.
|
||||||
|
|
||||||
baseurl: "/" # the subpath of your site, e.g. /blog
|
baseurl: "" # the subpath of your site, e.g. /blog
|
||||||
url: "jkaninda.github.io/goma-gateway" # the base hostname & protocol for your site, e.g. http://example.com
|
url: "jkaninda.github.io/goma-gateway/" # the base hostname & protocol for your site, e.g. http://example.com
|
||||||
twitter_username: jonaskaninda
|
twitter_username: jonaskaninda
|
||||||
github_username: jkaninda
|
github_username: jkaninda
|
||||||
|
|
||||||
|
|||||||
14
goma.yml
14
goma.yml
@@ -45,7 +45,7 @@ gateway:
|
|||||||
path: /public
|
path: /public
|
||||||
## Rewrite a request path
|
## Rewrite a request path
|
||||||
# e.g rewrite: /store to /
|
# e.g rewrite: /store to /
|
||||||
rewrite: /healthz
|
rewrite: /
|
||||||
destination: https://example.com
|
destination: https://example.com
|
||||||
#DisableHeaderXForward Disable X-forwarded header.
|
#DisableHeaderXForward Disable X-forwarded header.
|
||||||
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
# [X-Forwarded-Host, X-Forwarded-For, Host, Scheme ]
|
||||||
@@ -76,8 +76,8 @@ gateway:
|
|||||||
- name: Authentication service
|
- name: Authentication service
|
||||||
path: /auth
|
path: /auth
|
||||||
rewrite: /
|
rewrite: /
|
||||||
destination: 'http://security-service:8080'
|
destination: https://example.com
|
||||||
healthCheck: /internal/health/ready
|
healthCheck: /
|
||||||
cors: {}
|
cors: {}
|
||||||
middlewares:
|
middlewares:
|
||||||
- api-forbidden-paths
|
- api-forbidden-paths
|
||||||
@@ -129,17 +129,17 @@ middlewares:
|
|||||||
#
|
#
|
||||||
# Add header to the next request from AuthRequest header, depending on your requirements
|
# Add header to the next request from AuthRequest header, depending on your requirements
|
||||||
# Key is AuthRequest's response header Key, and value is Request's header Key
|
# Key is AuthRequest's response header Key, and value is Request's header Key
|
||||||
# In case you want to get headers from the Authentication service and inject them into the next request's headers
|
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||||
headers:
|
headers:
|
||||||
userId: X-Auth-UserId
|
userId: X-Auth-UserId
|
||||||
userCountryId: X-Auth-UserCountryId
|
userCountryId: X-Auth-UserCountryId
|
||||||
# In case you want to get headers from the Authentication service and inject them to the next request's params
|
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
||||||
params:
|
params:
|
||||||
userCountryId: countryId
|
userCountryId: countryId
|
||||||
# The server will return 404
|
# The server will return 403
|
||||||
- name: api-forbidden-paths
|
- name: api-forbidden-paths
|
||||||
type: access
|
type: access
|
||||||
## Forbidden paths
|
## prevents access paths
|
||||||
paths:
|
paths:
|
||||||
- /swagger-ui/*
|
- /swagger-ui/*
|
||||||
- /v2/swagger-ui/*
|
- /v2/swagger-ui/*
|
||||||
|
|||||||
Reference in New Issue
Block a user