feat: Add configurable max_request_line_size to handle long URLs

This commit adds a new configuration option `max_request_line_size` that allows
users to increase the HTTP request line size limit. This is particularly useful
for handling very long continuation tokens that can cause 414 (URI Too Long) errors.

Changes:
- Add `max_request_line_size` property to Config class
- Configure Kemal server to use the custom limit if specified
- Document the option in config.example.yml with recommendations
- Add examples in docker-compose.yml for both YAML and env var configuration

The default behavior remains unchanged (8KB limit) unless explicitly configured.
This provides a solution for users experiencing 414 errors without affecting
existing installations.
This commit is contained in:
Sunghyun Kim
2025-07-21 13:05:23 +09:00
parent df8839d1f0
commit 2b312a1ec5
4 changed files with 23 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ services:
# Please read the following file for a comprehensive list of all available
# configuration options and their associated syntax:
# 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: |
db:
dbname: invidious