Skip to content

Commit

Permalink
Update extra_http_headers configuration (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenRenaux authored Jan 8, 2025
1 parent 7f1e8e9 commit 72473ec
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 159 deletions.
130 changes: 68 additions & 62 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,13 @@ sensiolabs_gotenberg:
user_agent: null

# HTTP headers to send by Chromium while loading the HTML document - default None. https://gotenberg.dev/docs/routes#custom-http-headers
extra_http_headers:
extra_http_headers: []

# Example:
# 'X-Custom-Header': 'custom-header-value'

# Prototype
name:
name: ~
value: ~
# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }

# Return a 409 Conflict response if the HTTP status code from the main page is not acceptable. - default [499,599]. https://gotenberg.dev/docs/routes#invalid-http-status-codes-chromium
fail_on_http_status_codes:
Expand Down Expand Up @@ -472,15 +473,13 @@ sensiolabs_gotenberg:
method: null # One of "POST"; "PUT"; "PATCH"

# HTTP headers to send back to both success and error endpoints - default None. https://gotenberg.dev/docs/webhook
extra_http_headers:
extra_http_headers: []

# Example:
# - { name: X-Custom-Header, value: custom-header-value }

# Prototype
name:
name: ~
value: ~
# 'X-Custom-Header': 'custom-header-value'

# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }
markdown:

# Add default header to the builder.
Expand Down Expand Up @@ -571,12 +570,13 @@ sensiolabs_gotenberg:
user_agent: null

# HTTP headers to send by Chromium while loading the HTML document - default None. https://gotenberg.dev/docs/routes#custom-http-headers
extra_http_headers:
extra_http_headers: []

# Example:
# 'X-Custom-Header': 'custom-header-value'

# Prototype
name:
name: ~
value: ~
# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }

# Return a 409 Conflict response if the HTTP status code from the main page is not acceptable. - default [499,599]. https://gotenberg.dev/docs/routes#invalid-http-status-codes-chromium
fail_on_http_status_codes:
Expand Down Expand Up @@ -669,15 +669,13 @@ sensiolabs_gotenberg:
method: null # One of "POST"; "PUT"; "PATCH"

# HTTP headers to send back to both success and error endpoints - default None. https://gotenberg.dev/docs/webhook
extra_http_headers:
extra_http_headers: []

# Example:
# - { name: X-Custom-Header, value: custom-header-value }

# Prototype
name:
name: ~
value: ~
# 'X-Custom-Header': 'custom-header-value'

# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }
office:

# Set the password for opening the source file. https://gotenberg.dev/docs/routes#page-properties-libreoffice
Expand Down Expand Up @@ -907,12 +905,13 @@ sensiolabs_gotenberg:
user_agent: null

# HTTP headers to send by Chromium while loading the HTML document - default None. https://gotenberg.dev/docs/routes#custom-http-headers
extra_http_headers:
extra_http_headers: []

# Example:
# 'X-Custom-Header': 'custom-header-value'

# Prototype
name:
name: ~
value: ~
# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }

# Return a 409 Conflict response if the HTTP status code from the main page is not acceptable. - default [499,599]. https://gotenberg.dev/docs/routes#invalid-http-status-codes-chromium
fail_on_http_status_codes:
Expand Down Expand Up @@ -975,15 +974,13 @@ sensiolabs_gotenberg:
method: null # One of "POST"; "PUT"; "PATCH"

# HTTP headers to send back to both success and error endpoints - default None. https://gotenberg.dev/docs/webhook
extra_http_headers:
extra_http_headers: []

# Example:
# - { name: X-Custom-Header, value: custom-header-value }

# Prototype
name:
name: ~
value: ~
# 'X-Custom-Header': 'custom-header-value'

# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }
url:

# The device screen width in pixels. - default 800. https://gotenberg.dev/docs/routes#screenshots-route
Expand Down Expand Up @@ -1035,12 +1032,13 @@ sensiolabs_gotenberg:
user_agent: null

# HTTP headers to send by Chromium while loading the HTML document - default None. https://gotenberg.dev/docs/routes#custom-http-headers
extra_http_headers:
extra_http_headers: []

# Example:
# 'X-Custom-Header': 'custom-header-value'

# Prototype
name:
name: ~
value: ~
# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }

# Return a 409 Conflict response if the HTTP status code from the main page is not acceptable. - default [499,599]. https://gotenberg.dev/docs/routes#invalid-http-status-codes-chromium
fail_on_http_status_codes:
Expand Down Expand Up @@ -1103,15 +1101,13 @@ sensiolabs_gotenberg:
method: null # One of "POST"; "PUT"; "PATCH"

# HTTP headers to send back to both success and error endpoints - default None. https://gotenberg.dev/docs/webhook
extra_http_headers:
extra_http_headers: []

# Example:
# - { name: X-Custom-Header, value: custom-header-value }

# Prototype
name:
name: ~
value: ~
# 'X-Custom-Header': 'custom-header-value'

# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }
markdown:

# The device screen width in pixels. - default 800. https://gotenberg.dev/docs/routes#screenshots-route
Expand Down Expand Up @@ -1163,12 +1159,13 @@ sensiolabs_gotenberg:
user_agent: null

# HTTP headers to send by Chromium while loading the HTML document - default None. https://gotenberg.dev/docs/routes#custom-http-headers
extra_http_headers:
extra_http_headers: []

# Prototype
name:
name: ~
value: ~
# Example:
# 'X-Custom-Header': 'custom-header-value'

# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }

# Return a 409 Conflict response if the HTTP status code from the main page is not acceptable. - default [499,599]. https://gotenberg.dev/docs/routes#invalid-http-status-codes-chromium
fail_on_http_status_codes:
Expand Down Expand Up @@ -1231,15 +1228,13 @@ sensiolabs_gotenberg:
method: null # One of "POST"; "PUT"; "PATCH"

# HTTP headers to send back to both success and error endpoints - default None. https://gotenberg.dev/docs/webhook
extra_http_headers:
extra_http_headers: []

# Example:
# - { name: X-Custom-Header, value: custom-header-value }

# Prototype
name:
name: ~
value: ~
# 'X-Custom-Header': 'custom-header-value'

# Or the syntax below is also possible
# - { name: 'X-Custom-Header', value: 'custom-header-value' }
```

> [!TIP]
Expand All @@ -1250,6 +1245,17 @@ sensiolabs_gotenberg:

HTTP headers to send by Chromium while loading the HTML document.

```yaml
sensiolabs_gotenberg:
default_options:
pdf:
html:
extra_http_headers:
'My-Header': 'MyValue'
```
Or the syntax below is also possible
```yaml
sensiolabs_gotenberg:
default_options:
Expand All @@ -1259,14 +1265,14 @@ sensiolabs_gotenberg:
- { name: 'My-Header', value: 'MyValue' }
```
Or Headers to send to your webhook endpoint
Headers to send to your webhook endpoint
```yaml
sensiolabs_gotenberg:
webhook:
default:
extra_http_headers:
- { name: 'My-Header', value: 'MyValue' }
'My-Header': 'MyValue'
```
> [!TIP]
Expand Down
Loading

0 comments on commit 72473ec

Please sign in to comment.