mirror of
https://github.com/fosrl/docs-v2.git
synced 2026-10-07 13:19:09 +02:00
Added response and request headers documentation for blueprints
This commit is contained in:
@@ -205,9 +205,9 @@ public-resources:
|
|||||||
full-domain: app.example.com
|
full-domain: app.example.com
|
||||||
host-header: app.internal
|
host-header: app.internal
|
||||||
tls-server-name: app.internal
|
tls-server-name: app.internal
|
||||||
headers:
|
response-headers:
|
||||||
- name: X-Env
|
- name: Access-Control-Allow-Origin
|
||||||
value: production
|
value: *
|
||||||
rules:
|
rules:
|
||||||
- action: allow
|
- action: allow
|
||||||
match: country
|
match: country
|
||||||
@@ -458,7 +458,7 @@ Example YAML:
|
|||||||
```yaml
|
```yaml
|
||||||
public-resources:
|
public-resources:
|
||||||
my-app:
|
my-app:
|
||||||
headers:
|
request-headers:
|
||||||
- name: X-Env
|
- name: X-Env
|
||||||
value: prod
|
value: prod
|
||||||
```
|
```
|
||||||
@@ -467,8 +467,8 @@ Equivalent Compose labels:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
labels:
|
labels:
|
||||||
- pangolin.public-resources.my-app.headers[0].name=X-Env
|
- pangolin.public-resources.my-app.request-headers[0].name=X-Env
|
||||||
- pangolin.public-resources.my-app.headers[0].value=prod
|
- pangolin.public-resources.my-app.request-headers[0].value=prod
|
||||||
```
|
```
|
||||||
|
|
||||||
<Note>
|
<Note>
|
||||||
@@ -512,8 +512,8 @@ services:
|
|||||||
- pangolin.public-resources.nginx.name=nginx
|
- pangolin.public-resources.nginx.name=nginx
|
||||||
- pangolin.public-resources.nginx.full-domain=nginx.fosrl.io
|
- pangolin.public-resources.nginx.full-domain=nginx.fosrl.io
|
||||||
- pangolin.public-resources.nginx.protocol=http
|
- pangolin.public-resources.nginx.protocol=http
|
||||||
- pangolin.public-resources.nginx.headers[0].name=X-Example-Header
|
- pangolin.public-resources.nginx.request-headers[0].name=X-Example-Header
|
||||||
- pangolin.public-resources.nginx.headers[0].value=example-value
|
- pangolin.public-resources.nginx.request-headers[0].value=example-value
|
||||||
- pangolin.public-resources.nginx.targets[0].method=http
|
- pangolin.public-resources.nginx.targets[0].method=http
|
||||||
- pangolin.public-resources.nginx.targets[0].path=/path
|
- pangolin.public-resources.nginx.targets[0].path=/path
|
||||||
- pangolin.public-resources.nginx.targets[0].path-match=prefix
|
- pangolin.public-resources.nginx.targets[0].path-match=prefix
|
||||||
@@ -652,9 +652,12 @@ public-resources:
|
|||||||
- production
|
- production
|
||||||
host-header: internal.example.local
|
host-header: internal.example.local
|
||||||
tls-server-name: internal.example.local
|
tls-server-name: internal.example.local
|
||||||
headers:
|
request-headers:
|
||||||
- name: X-Env
|
- name: X-Env
|
||||||
value: prod
|
value: prod
|
||||||
|
response-headers:
|
||||||
|
- name: Access-Control-Allow-Origin
|
||||||
|
value: *
|
||||||
rules:
|
rules:
|
||||||
- action: allow
|
- action: allow
|
||||||
match: country
|
match: country
|
||||||
@@ -892,31 +895,60 @@ public-resources:
|
|||||||
Container label: `pangolin.public-resources.web-app.tls-server-name=internal.example.local`
|
Container label: `pangolin.public-resources.web-app.tls-server-name=internal.example.local`
|
||||||
</ResponseField>
|
</ResponseField>
|
||||||
|
|
||||||
<ResponseField name="headers" type="array of objects">
|
<ResponseField name="request-headers" type="array of objects">
|
||||||
Static headers added to proxied requests.
|
Static headers added to proxied requests.
|
||||||
|
|
||||||
Container labels for arrays must include an index (`[0]`, `[1]`, ...).
|
Container labels for arrays must include an index (`[0]`, `[1]`, ...).
|
||||||
|
|
||||||
YAML: `headers: [{ name: X-Env, value: prod }]`
|
YAML: `request-headers: [{ name: X-Env, value: prod }]`
|
||||||
Container label: `pangolin.public-resources.web-app.headers[0].name=X-Env`
|
Container label: `pangolin.public-resources.web-app.request-headers[0].name=X-Env`
|
||||||
|
|
||||||
<Expandable title="Header object">
|
<Expandable title="Header object">
|
||||||
<ResponseField name="name" type="string" required>
|
<ResponseField name="name" type="string" required>
|
||||||
Header name.
|
Header name.
|
||||||
|
|
||||||
YAML: `name: X-Env`
|
YAML: `name: X-Env`
|
||||||
Container label: `pangolin.public-resources.web-app.headers[0].name=X-Env`
|
Container label: `pangolin.public-resources.web-app.request-headers[0].name=X-Env`
|
||||||
</ResponseField>
|
</ResponseField>
|
||||||
|
|
||||||
<ResponseField name="value" type="string" required>
|
<ResponseField name="value" type="string" required>
|
||||||
Header value.
|
Header value.
|
||||||
|
|
||||||
YAML: `value: prod`
|
YAML: `value: prod`
|
||||||
Container label: `pangolin.public-resources.web-app.headers[0].value=prod`
|
Container label: `pangolin.public-resources.web-app.request-headers[0].value=prod`
|
||||||
</ResponseField>
|
</ResponseField>
|
||||||
</Expandable>
|
</Expandable>
|
||||||
</ResponseField>
|
</ResponseField>
|
||||||
|
|
||||||
|
<ResponseField name="response-headers" type="array of objects">
|
||||||
|
Static headers added to proxied responses.
|
||||||
|
|
||||||
|
Container labels for arrays must include an index (`[0]`, `[1]`, ...).
|
||||||
|
|
||||||
|
YAML: `response-headers: [{ name: Cache-Control, value: no-cache }]`
|
||||||
|
Container label: `pangolin.public-resources.web-app.response-headers[0].name=Cache-Control`
|
||||||
|
|
||||||
|
<Expandable title="Header object">
|
||||||
|
<ResponseField name="name" type="string" required>
|
||||||
|
Header name.
|
||||||
|
|
||||||
|
YAML: `name: Cache-Control`
|
||||||
|
Container label: `pangolin.public-resources.web-app.response-headers[0].name=Cache-Control`
|
||||||
|
</ResponseField>
|
||||||
|
|
||||||
|
<ResponseField name="value" type="string" required>
|
||||||
|
Header value.
|
||||||
|
|
||||||
|
YAML: `value: no-cache`
|
||||||
|
Container label: `pangolin.public-resources.web-app.response-headers[0].value=no-cache`
|
||||||
|
</ResponseField>
|
||||||
|
</Expandable>
|
||||||
|
</ResponseField>
|
||||||
|
|
||||||
|
<ResponseField name="headers" type="array of objects" deprecated>
|
||||||
|
Deprecated alias for `request-headers`.
|
||||||
|
</ResponseField>
|
||||||
|
|
||||||
<ResponseField name="rules" type="array of objects">
|
<ResponseField name="rules" type="array of objects">
|
||||||
Ordered access rules for public resources.
|
Ordered access rules for public resources.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user