1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 00:40:06 +01:00

Prevent 502 errors when using AJAX

When using the Laravel DebugBar with the `capture_ajax` flag set to `true`, its AJAX request monitoring exceeds the FastCGI buffer limit. This results in Nginx throwing a 502 Bad Gateway exception. 

This PR increases the size of the buffer. While it is not guaranteed to fix the problem, the increased buffer size should solve the issue for most developers. Further discussion on this subject can be [found in this issue on the DebugBar repo](https://github.com/barryvdh/laravel-debugbar/issues/251)
This commit is contained in:
Matt Kingshott
2021-07-29 16:47:24 +01:00
committed by GitHub
parent dbf050b4e2
commit b097f87180

View File

@@ -27,6 +27,10 @@ server {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass "unix:VALET_HOME_PATH/valet.sock";
fastcgi_index "VALET_SERVER_PATH";
fastcgi_temp_file_write_size 10m;
fastcgi_busy_buffers_size 512k;
fastcgi_buffer_size 512k;
fastcgi_buffers 16 512k;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME "VALET_SERVER_PATH";
fastcgi_param PATH_INFO $fastcgi_path_info;