2024-11-10 08:15:47 +01:00
---
title: Gateway
layout: default
parent: Quickstart
nav_order: 1
---
# Gateway
```yaml
version: 1.0
gateway:
2024-11-12 21:57:49 +01:00
sslCertFile: /etc/goma/cert.pem
sslKeyFile: /etc/goma/key.pem
2024-11-10 08:15:47 +01:00
writeTimeout: 15
readTimeout: 15
idleTimeout: 30
# Rate limiting
2024-11-10 19:58:53 +01:00
rateLimit: 0
2024-11-10 08:15:47 +01:00
accessLog: /dev/Stdout
errorLog: /dev/stderr
2024-11-10 19:58:53 +01:00
logLevel: info
2024-11-18 10:28:00 +01:00
## Add additional routes
extraRoutes:
# path
directory: /etc/goma/extra
watch: true
2024-11-10 08:15:47 +01:00
disableRouteHealthCheckError: false
disableDisplayRouteOnStart: false
disableKeepAlive: false
disableHealthCheckStatus: false
blockCommonExploits: true
2024-11-12 21:57:49 +01:00
# Intercept backend errors
2024-11-10 08:15:47 +01:00
interceptErrors:
- 500
cors:
origins:
- http://localhost:8080
- https://example.com
headers:
Access-Control-Allow-Credentials: "true"
Access-Control-Allow-Headers: Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id
Access-Control-Max-Age: "1728000"
2024-11-18 10:28:00 +01:00
routes: []
2024-11-10 08:15:47 +01:00
```
2024-11-18 10:28:00 +01:00
## Extra Routes
2024-11-10 08:15:47 +01:00
2024-11-18 10:28:00 +01:00
The Extra Routes feature allows you to define additional routes by using .yml or .yaml files stored in a specified directory.
This approach helps you avoid the complexity of managing all routes in a single file.
When dealing with many routes, maintaining them in one file can quickly become unwieldy. With this feature, you can organize your routes into separate files, making them easier to manage and maintain.
```yaml
version: 1.0
gateway:
sslCertFile: /etc/goma/cert.pem
sslKeyFile: /etc/goma/key.pem
writeTimeout: 15
readTimeout: 15
idleTimeout: 30
# Rate limiting
rateLimit: 0
accessLog: /dev/Stdout
errorLog: /dev/stderr
logLevel: info
disableRouteHealthCheckError: false
disableDisplayRouteOnStart: false
disableKeepAlive: false
disableHealthCheckStatus: false
blockCommonExploits: true
# Intercept backend errors
interceptErrors:
- 500
cors:
origins:
- http://localhost:8080
- https://example.com
headers:
Access-Control-Allow-Credentials: "true"
Access-Control-Allow-Headers: Origin, Authorization, Accept, Content-Type, Access-Control-Allow-Headers, X-Client-Id, X-Session-Id
Access-Control-Max-Age: "1728000"
2024-11-18 11:50:53 +01:00
## Add additional routes
extraRoutes:
# path
directory: /etc/goma/extra
watch: true
2024-11-18 10:28:00 +01:00
routes: []
```