docs: update configuration
This commit is contained in:
29
README.md
29
README.md
@@ -119,7 +119,6 @@ Create a config file in this format
|
|||||||
|
|
||||||
Example of a configuration file
|
Example of a configuration file
|
||||||
```yaml
|
```yaml
|
||||||
## Goma - simple lightweight API Gateway and Reverse Proxy.
|
|
||||||
# Goma Gateway configurations
|
# Goma Gateway configurations
|
||||||
gateway:
|
gateway:
|
||||||
########## Global settings
|
########## Global settings
|
||||||
@@ -135,7 +134,7 @@ gateway:
|
|||||||
rateLimiter: 0
|
rateLimiter: 0
|
||||||
accessLog: "/dev/Stdout"
|
accessLog: "/dev/Stdout"
|
||||||
errorLog: "/dev/stderr"
|
errorLog: "/dev/stderr"
|
||||||
## Enable and disable routes healthc check
|
## Enable, disable routes health check
|
||||||
disableHealthCheckStatus: false
|
disableHealthCheckStatus: false
|
||||||
## Returns backend route healthcheck errors
|
## Returns backend route healthcheck errors
|
||||||
disableRouteHealthCheckError: false
|
disableRouteHealthCheckError: false
|
||||||
@@ -178,23 +177,23 @@ gateway:
|
|||||||
healthCheck: '' #/internal/health/ready
|
healthCheck: '' #/internal/health/ready
|
||||||
# Route Cors, global cors will be overridden by route
|
# Route Cors, global cors will be overridden by route
|
||||||
cors:
|
cors:
|
||||||
# Route Origins Cors, global cors will be overridden by route
|
# Route Origins Cors, route will override global cors origins
|
||||||
origins:
|
origins:
|
||||||
- https://dev.example.com
|
- https://dev.example.com
|
||||||
- http://localhost:3000
|
- http://localhost:3000
|
||||||
- https://example.com
|
- https://example.com
|
||||||
# Route Cors headers, route will override global cors
|
# Route Cors headers, route will override global cors headers
|
||||||
headers:
|
headers:
|
||||||
Access-Control-Allow-Methods: 'GET'
|
Access-Control-Allow-Methods: 'GET'
|
||||||
Access-Control-Allow-Headers: 'Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id'
|
Access-Control-Allow-Headers: 'Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id'
|
||||||
Access-Control-Allow-Credentials: 'true'
|
Access-Control-Allow-Credentials: 'true'
|
||||||
Access-Control-Max-Age: 1728000
|
Access-Control-Max-Age: 1728000
|
||||||
##### Define route middlewares from middlewares names
|
##### Apply middlewares to the route
|
||||||
## The name must be unique
|
## The name must be unique
|
||||||
## List of middleware name
|
## List of middleware name
|
||||||
middlewares:
|
middlewares:
|
||||||
- api-forbidden-paths
|
- api-forbidden-paths
|
||||||
# Example of a route | 3
|
# Example of a route | 2
|
||||||
- name: Basic auth
|
- name: Basic auth
|
||||||
path: /protected
|
path: /protected
|
||||||
rewrite: /
|
rewrite: /
|
||||||
@@ -235,20 +234,16 @@ middlewares:
|
|||||||
# Required headers, if not present in the request, the proxy will return 403
|
# Required headers, if not present in the request, the proxy will return 403
|
||||||
requiredHeaders:
|
requiredHeaders:
|
||||||
- Authorization
|
- Authorization
|
||||||
#Sets the request variable to the given value after the authorization request completes.
|
# You can also get headers from the authentication request result and inject them into the next request header or params.
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# In case you want to get headers from the Authentication service and inject them into the next request's headers
|
|
||||||
#Sets the request variable to the given value after the authorization request completes.
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||||
|
# Set the request variable to the given value after the authorization request completes.
|
||||||
|
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||||
|
# Key is authentication request response header Key. Value is the next Request header Key.
|
||||||
headers:
|
headers:
|
||||||
userId: X-Auth-UserId
|
userId: Auth-UserId
|
||||||
userCountryId: X-Auth-UserCountryId
|
userCountryId: Auth-UserCountryId
|
||||||
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
||||||
|
#Key is authentication request response header Key. Value is the next Request parameter Key.
|
||||||
params:
|
params:
|
||||||
userCountryId: countryId
|
userCountryId: countryId
|
||||||
# The server will return 403
|
# The server will return 403
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ middlewares:
|
|||||||
# Required headers, if not present in the request, the proxy will return 403
|
# Required headers, if not present in the request, the proxy will return 403
|
||||||
requiredHeaders:
|
requiredHeaders:
|
||||||
- Authorization
|
- Authorization
|
||||||
#Sets the request variable to the given value after the authorization request completes.
|
#Set the request variable to the given value after the authorization request completes.
|
||||||
#
|
#
|
||||||
# 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
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ services:
|
|||||||
|
|
||||||
Example of a configuration file
|
Example of a configuration file
|
||||||
```yaml
|
```yaml
|
||||||
## Goma - simple lightweight API Gateway and Reverse Proxy.
|
|
||||||
# Goma Gateway configurations
|
# Goma Gateway configurations
|
||||||
gateway:
|
gateway:
|
||||||
########## Global settings
|
########## Global settings
|
||||||
@@ -70,7 +69,7 @@ gateway:
|
|||||||
rateLimiter: 0
|
rateLimiter: 0
|
||||||
accessLog: "/dev/Stdout"
|
accessLog: "/dev/Stdout"
|
||||||
errorLog: "/dev/stderr"
|
errorLog: "/dev/stderr"
|
||||||
## Enable and disable routes healthc check
|
## Enable, disable routes health check
|
||||||
disableHealthCheckStatus: false
|
disableHealthCheckStatus: false
|
||||||
## Returns backend route healthcheck errors
|
## Returns backend route healthcheck errors
|
||||||
disableRouteHealthCheckError: false
|
disableRouteHealthCheckError: false
|
||||||
@@ -113,23 +112,23 @@ gateway:
|
|||||||
healthCheck: '' #/internal/health/ready
|
healthCheck: '' #/internal/health/ready
|
||||||
# Route Cors, global cors will be overridden by route
|
# Route Cors, global cors will be overridden by route
|
||||||
cors:
|
cors:
|
||||||
# Route Origins Cors, global cors will be overridden by route
|
# Route Origins Cors, route will override global cors origins
|
||||||
origins:
|
origins:
|
||||||
- https://dev.example.com
|
- https://dev.example.com
|
||||||
- http://localhost:3000
|
- http://localhost:3000
|
||||||
- https://example.com
|
- https://example.com
|
||||||
# Route Cors headers, route will override global cors
|
# Route Cors headers, route will override global cors headers
|
||||||
headers:
|
headers:
|
||||||
Access-Control-Allow-Methods: 'GET'
|
Access-Control-Allow-Methods: 'GET'
|
||||||
Access-Control-Allow-Headers: 'Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id'
|
Access-Control-Allow-Headers: 'Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id'
|
||||||
Access-Control-Allow-Credentials: 'true'
|
Access-Control-Allow-Credentials: 'true'
|
||||||
Access-Control-Max-Age: 1728000
|
Access-Control-Max-Age: 1728000
|
||||||
##### Define route middlewares from middlewares names
|
##### Apply middlewares to the route
|
||||||
## The name must be unique
|
## The name must be unique
|
||||||
## List of middleware name
|
## List of middleware name
|
||||||
middlewares:
|
middlewares:
|
||||||
- api-forbidden-paths
|
- api-forbidden-paths
|
||||||
# Example of a route | 3
|
# Example of a route | 2
|
||||||
- name: Basic auth
|
- name: Basic auth
|
||||||
path: /protected
|
path: /protected
|
||||||
rewrite: /
|
rewrite: /
|
||||||
@@ -170,20 +169,16 @@ middlewares:
|
|||||||
# Required headers, if not present in the request, the proxy will return 403
|
# Required headers, if not present in the request, the proxy will return 403
|
||||||
requiredHeaders:
|
requiredHeaders:
|
||||||
- Authorization
|
- Authorization
|
||||||
#Sets the request variable to the given value after the authorization request completes.
|
# You can also get headers from the authentication request result and inject them into the next request header or params.
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# In case you want to get headers from the Authentication service and inject them into the next request's headers
|
|
||||||
#Sets the request variable to the given value after the authorization request completes.
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||||
|
# Set the request variable to the given value after the authorization request completes.
|
||||||
|
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||||
|
# Key is authentication request response header Key. Value is the next Request header Key.
|
||||||
headers:
|
headers:
|
||||||
userId: X-Auth-UserId
|
userId: Auth-UserId
|
||||||
userCountryId: X-Auth-UserCountryId
|
userCountryId: Auth-UserCountryId
|
||||||
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
||||||
|
#Key is authentication request response header Key. Value is the next Request parameter Key.
|
||||||
params:
|
params:
|
||||||
userCountryId: countryId
|
userCountryId: countryId
|
||||||
# The server will return 403
|
# The server will return 403
|
||||||
|
|||||||
29
goma.yml
29
goma.yml
@@ -1,4 +1,3 @@
|
|||||||
## Goma - simple lightweight API Gateway and Reverse Proxy.
|
|
||||||
# Goma Gateway configurations
|
# Goma Gateway configurations
|
||||||
gateway:
|
gateway:
|
||||||
########## Global settings
|
########## Global settings
|
||||||
@@ -14,7 +13,7 @@ gateway:
|
|||||||
rateLimiter: 0
|
rateLimiter: 0
|
||||||
accessLog: "/dev/Stdout"
|
accessLog: "/dev/Stdout"
|
||||||
errorLog: "/dev/stderr"
|
errorLog: "/dev/stderr"
|
||||||
## Enable and disable routes healthc check
|
## Enable, disable routes health check
|
||||||
disableHealthCheckStatus: false
|
disableHealthCheckStatus: false
|
||||||
## Returns backend route healthcheck errors
|
## Returns backend route healthcheck errors
|
||||||
disableRouteHealthCheckError: false
|
disableRouteHealthCheckError: false
|
||||||
@@ -57,23 +56,23 @@ gateway:
|
|||||||
healthCheck: '' #/internal/health/ready
|
healthCheck: '' #/internal/health/ready
|
||||||
# Route Cors, global cors will be overridden by route
|
# Route Cors, global cors will be overridden by route
|
||||||
cors:
|
cors:
|
||||||
# Route Origins Cors, global cors will be overridden by route
|
# Route Origins Cors, route will override global cors origins
|
||||||
origins:
|
origins:
|
||||||
- https://dev.example.com
|
- https://dev.example.com
|
||||||
- http://localhost:3000
|
- http://localhost:3000
|
||||||
- https://example.com
|
- https://example.com
|
||||||
# Route Cors headers, route will override global cors
|
# Route Cors headers, route will override global cors headers
|
||||||
headers:
|
headers:
|
||||||
Access-Control-Allow-Methods: 'GET'
|
Access-Control-Allow-Methods: 'GET'
|
||||||
Access-Control-Allow-Headers: 'Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id'
|
Access-Control-Allow-Headers: 'Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id'
|
||||||
Access-Control-Allow-Credentials: 'true'
|
Access-Control-Allow-Credentials: 'true'
|
||||||
Access-Control-Max-Age: 1728000
|
Access-Control-Max-Age: 1728000
|
||||||
##### Define route middlewares from middlewares names
|
##### Apply middlewares to the route
|
||||||
## The name must be unique
|
## The name must be unique
|
||||||
## List of middleware name
|
## List of middleware name
|
||||||
middlewares:
|
middlewares:
|
||||||
- api-forbidden-paths
|
- api-forbidden-paths
|
||||||
# Example of a route | 3
|
# Example of a route | 2
|
||||||
- name: Basic auth
|
- name: Basic auth
|
||||||
path: /protected
|
path: /protected
|
||||||
rewrite: /
|
rewrite: /
|
||||||
@@ -114,20 +113,16 @@ middlewares:
|
|||||||
# Required headers, if not present in the request, the proxy will return 403
|
# Required headers, if not present in the request, the proxy will return 403
|
||||||
requiredHeaders:
|
requiredHeaders:
|
||||||
- Authorization
|
- Authorization
|
||||||
#Sets the request variable to the given value after the authorization request completes.
|
# You can also get headers from the authentication request result and inject them into the next request header or params.
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# In case you want to get headers from the Authentication service and inject them into the next request's headers
|
|
||||||
#Sets the request variable to the given value after the authorization request completes.
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||||
|
# Set the request variable to the given value after the authorization request completes.
|
||||||
|
# In case you want to get headers from the authentication service and inject them into the next request headers.
|
||||||
|
# Key is authentication request response header Key. Value is the next Request header Key.
|
||||||
headers:
|
headers:
|
||||||
userId: X-Auth-UserId
|
userId: Auth-UserId
|
||||||
userCountryId: X-Auth-UserCountryId
|
userCountryId: Auth-UserCountryId
|
||||||
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
# In case you want to get headers from the Authentication service and inject them to the next request params.
|
||||||
|
#Key is authentication request response header Key. Value is the next Request parameter Key.
|
||||||
params:
|
params:
|
||||||
userCountryId: countryId
|
userCountryId: countryId
|
||||||
# The server will return 403
|
# The server will return 403
|
||||||
|
|||||||
Reference in New Issue
Block a user