mirror of
https://github.com/iv-org/invidious.git
synced 2025-12-16 08:53:57 -05:00
Hardcode max_request_line_size to 16384
This commit is contained in:
parent
2b312a1ec5
commit
e7827f1cee
4 changed files with 2 additions and 23 deletions
|
|
@ -191,20 +191,6 @@ https_only: false
|
||||||
# path: /tmp/invidious.sock
|
# path: /tmp/invidious.sock
|
||||||
# permissions: 777
|
# permissions: 777
|
||||||
|
|
||||||
##
|
|
||||||
## Maximum size of the HTTP request line (in bytes).
|
|
||||||
## Increase this value if you encounter 414 errors when using URLs with long
|
|
||||||
## query parameters (e.g., very long continuation tokens).
|
|
||||||
##
|
|
||||||
## Note: This directly sets the HTTP server's max_request_line_size.
|
|
||||||
## Be cautious when increasing this value on public instances.
|
|
||||||
##
|
|
||||||
## Accepted values: integer (size in bytes)
|
|
||||||
## Default: 8192 (8KB, Crystal's default)
|
|
||||||
## Recommended: 16384 (16KB) if experiencing 414 errors
|
|
||||||
##
|
|
||||||
#max_request_line_size: 16384
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Network (outbound)
|
# Network (outbound)
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ services:
|
||||||
# Please read the following file for a comprehensive list of all available
|
# Please read the following file for a comprehensive list of all available
|
||||||
# configuration options and their associated syntax:
|
# configuration options and their associated syntax:
|
||||||
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
|
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
|
||||||
# Uncomment to increase max request line size (if you get 414 errors):
|
|
||||||
# INVIDIOUS_MAX_REQUEST_LINE_SIZE: 16384
|
|
||||||
INVIDIOUS_CONFIG: |
|
INVIDIOUS_CONFIG: |
|
||||||
db:
|
db:
|
||||||
dbname: invidious
|
dbname: invidious
|
||||||
|
|
|
||||||
|
|
@ -252,11 +252,8 @@ Kemal.config.app_name = "Invidious"
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
Kemal.run do |config|
|
Kemal.run do |config|
|
||||||
# Set max request line size if configured
|
config.server.not_nil!.max_request_line_size = 16384
|
||||||
if max_size = CONFIG.max_request_line_size
|
|
||||||
config.server.not_nil!.max_request_line_size = max_size
|
|
||||||
end
|
|
||||||
|
|
||||||
if socket_binding = CONFIG.socket_binding
|
if socket_binding = CONFIG.socket_binding
|
||||||
File.delete?(socket_binding.path)
|
File.delete?(socket_binding.path)
|
||||||
# Create a socket and set its desired permissions
|
# Create a socket and set its desired permissions
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,6 @@ class Config
|
||||||
property host_binding : String = "0.0.0.0"
|
property host_binding : String = "0.0.0.0"
|
||||||
# Path and permissions to make Invidious listen on a UNIX socket instead of a TCP port
|
# Path and permissions to make Invidious listen on a UNIX socket instead of a TCP port
|
||||||
property socket_binding : SocketBindingConfig? = nil
|
property socket_binding : SocketBindingConfig? = nil
|
||||||
# Maximum size of request line (in bytes), increase if you get 414 errors with long URLs
|
|
||||||
property max_request_line_size : Int32? = nil
|
|
||||||
# Pool size for HTTP requests to youtube.com and ytimg.com (each domain has a separate pool of `pool_size`)
|
# Pool size for HTTP requests to youtube.com and ytimg.com (each domain has a separate pool of `pool_size`)
|
||||||
property pool_size : Int32 = 100
|
property pool_size : Int32 = 100
|
||||||
# HTTP Proxy configuration
|
# HTTP Proxy configuration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue