mirror of
https://github.com/hanzoai/base.git
synced 2026-10-21 03:41:50 +00:00
The mount prefix has been /v1 since apis/base.go took BASE_API_PREFIX. The auth comments, the compose examples, the dev gateway routes and the smoke script still named PocketBase's prefix — the smoke script actually called it, so every request in it 404d.
78 lines
1.8 KiB
JSON
78 lines
1.8 KiB
JSON
{
|
|
"$schema": "https://gateway.hanzo.ai/schema/v3.json",
|
|
"version": 3,
|
|
"name": "Base Network dev gateway",
|
|
"port": 8080,
|
|
"timeout": "30s",
|
|
"output_encoding": "no-op",
|
|
"extra_config": {
|
|
"router": {
|
|
"return_error_msg": true
|
|
},
|
|
"telemetry/logging": {
|
|
"level": "INFO",
|
|
"prefix": "[GATEWAY]",
|
|
"stdout": true
|
|
}
|
|
},
|
|
"endpoints": [
|
|
{
|
|
"endpoint": "/v1/{path}",
|
|
"method": "GET",
|
|
"input_headers": ["*"],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/{path}",
|
|
"host": ["http://base-a:8090"],
|
|
"encoding": "no-op",
|
|
"extra_config": {
|
|
"github.com/hanzoai/gateway/base-network": {
|
|
"shard_key": "user_id",
|
|
"shard_key_source": "header:X-User-Id"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"endpoint": "/v1/{path}",
|
|
"method": "POST",
|
|
"input_headers": ["*"],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/{path}",
|
|
"host": ["http://base-a:8090"],
|
|
"encoding": "no-op",
|
|
"extra_config": {
|
|
"github.com/hanzoai/gateway/base-network": {
|
|
"shard_key": "user_id",
|
|
"shard_key_source": "header:X-User-Id"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"endpoint": "/v1/{path}",
|
|
"method": "DELETE",
|
|
"input_headers": ["*"],
|
|
"output_encoding": "no-op",
|
|
"backend": [
|
|
{
|
|
"url_pattern": "/v1/{path}",
|
|
"host": ["http://base-a:8090"],
|
|
"encoding": "no-op",
|
|
"extra_config": {
|
|
"github.com/hanzoai/gateway/base-network": {
|
|
"shard_key": "user_id",
|
|
"shard_key_source": "header:X-User-Id"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|