feat: X-Host-Only
This commit is contained in:
@@ -104,6 +104,7 @@ options:
|
||||
PUT /{page}/
|
||||
X-Token (your API token)
|
||||
X-Host (optional host as entrypoint)
|
||||
X-Host-Only (optional host as entrypoint)
|
||||
(body with tar data)
|
||||
```
|
||||
|
||||
@@ -121,14 +122,24 @@ tar -czC dist . | curl -X PUT \
|
||||
--data-binary @- \
|
||||
https://stapler-host/my-project/
|
||||
|
||||
# make stapler server identifiers myproject.example.com as /my-project/
|
||||
# make stapler server identifiers myproject.example.com and /my-project/
|
||||
tar -czC dist . | curl -X PUT \
|
||||
--data-binary @- \
|
||||
-H 'X-Token: <TOKEN>' \
|
||||
-H 'X-Host: myproject.example.com' \
|
||||
https://stapler-host/my-project/
|
||||
|
||||
# make stapler server identifiers myproject.example.com only
|
||||
tar -czC dist . | curl -X PUT \
|
||||
--data-binary @- \
|
||||
-H 'X-Token: <TOKEN>' \
|
||||
-H 'X-Host-Only: myproject.example.com' \
|
||||
https://stapler-host/my-project/
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Creating/updating comes with `X-Host` for enabling host-based resolving but you can also use `X-Host-Only` to do the same thing but disable listing as /path/.
|
||||
|
||||
### Create/update page with redirect
|
||||
|
||||
```txt
|
||||
@@ -136,6 +147,7 @@ PUT /{page}/
|
||||
X-Token (your API token)
|
||||
X-Redirect (redirection target)
|
||||
X-Host (optional host as entrypoint)
|
||||
X-Host-Only (optional host as entrypoint)
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -160,6 +172,7 @@ PUT /{page}/
|
||||
X-Token (your API token)
|
||||
X-Proxy (proxy target)
|
||||
X-Host (optional host as entrypoint)
|
||||
X-Host-Only (optional host as entrypoint)
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user