docs: included required header for API calls
This commit is contained in:
@@ -49,24 +49,31 @@ Routes Minecraft client connections to backend servers based upon the requested
|
|||||||
|
|
||||||
# REST API
|
# REST API
|
||||||
|
|
||||||
* `GET /routes`
|
* `GET /routes` (with `Accept: application/json`)
|
||||||
|
|
||||||
Retrieves the currently configured routes
|
Retrieves the currently configured routes
|
||||||
* `POST /routes`
|
|
||||||
Registers a route given a JSON body structured like:
|
* `POST /routes` (with `Content-Type: application/json`)
|
||||||
```json
|
|
||||||
{
|
Registers a route given a JSON body structured like:
|
||||||
"serverAddress": "CLIENT REQUESTED SERVER ADDRESS",
|
```json
|
||||||
"backend": "HOST:PORT"
|
{
|
||||||
}
|
"serverAddress": "CLIENT REQUESTED SERVER ADDRESS",
|
||||||
```
|
"backend": "HOST:PORT"
|
||||||
* `POST /defaultRoute`
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
* `POST /defaultRoute` (with `Content-Type: application/json`)
|
||||||
|
|
||||||
Registers a default route to the given backend. JSON body is structured as:
|
Registers a default route to the given backend. JSON body is structured as:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"backend": "HOST:PORT"
|
"backend": "HOST:PORT"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
* `DELETE /routes/{serverAddress}`
|
* `DELETE /routes/{serverAddress}`
|
||||||
|
|
||||||
Deletes an existing route for the given `serverAddress`
|
Deletes an existing route for the given `serverAddress`
|
||||||
|
|
||||||
# Docker Multi-Architecture Image
|
# Docker Multi-Architecture Image
|
||||||
|
|||||||
@@ -11,8 +11,13 @@ services:
|
|||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
TYPE: FORGE
|
TYPE: FORGE
|
||||||
router:
|
router:
|
||||||
image: itzg/mc-router
|
image: ${MC_ROUTER_IMAGE:-itzg/mc-router}
|
||||||
|
environment:
|
||||||
|
# enable API
|
||||||
|
API_BINDING: ":25564"
|
||||||
ports:
|
ports:
|
||||||
- 25565:25565
|
- 25565:25565
|
||||||
|
# bind the API port to only loopback to avoid external exposure
|
||||||
|
- 127.0.0.1:25564:25564
|
||||||
command: --mapping=vanilla.example.com=vanilla:25565,forge.example.com=forge:25565
|
command: --mapping=vanilla.example.com=vanilla:25565,forge.example.com=forge:25565
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user