Skip to content

Commit aba31a8

Browse files
Fijxuhellosunghyun
andauthored
Set Kemal max_request_line_size to 16384 for large channel continuation query parameters. (#5566)
* 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. * Hardcode max_request_line_size to 16384 --------- Co-authored-by: Sunghyun Kim <[email protected]>
1 parent 994c25d commit aba31a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/invidious.cr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ Kemal.config.app_name = "Invidious"
250250
{% end %}
251251

252252
Kemal.run do |config|
253+
config.server.not_nil!.max_request_line_size = 16384
254+
253255
if socket_binding = CONFIG.socket_binding
254256
File.delete?(socket_binding.path)
255257
# Create a socket and set its desired permissions

0 commit comments

Comments
 (0)