Skip to content

Commit

Permalink
feat: pass X-Accel-* headers to client, fixes ddev#6563 (ddev#6564) […
Browse files Browse the repository at this point in the history
…skip ci]

Co-authored-by: Randy Fay <[email protected]>
  • Loading branch information
andriokha and rfay authored Oct 10, 2024
1 parent 08589a8 commit 883ebe9
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-backdrop.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-craftcms.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Prevent clients from accessing hidden files (starting with a dot)
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-drupal.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-drupal10.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-drupal6.conf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-drupal7.conf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-drupal8.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-drupal9.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ server {
# fastcgi_read_timeout should match max_execution_time in php.ini
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
fastcgi_param HTTPS $fcgi_https;
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-laravel.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-magento.conf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ server {
fastcgi_param HTTPS $fcgi_https;
fastcgi_param MAGE_RUN_CODE $mage_run_code;
fastcgi_param MAGE_RUN_TYPE $mage_run_type;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-magento2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ server {
fastcgi_param HTTPS $fcgi_https;
fastcgi_param MAGE_RUN_CODE $mage_run_code;
fastcgi_param MAGE_RUN_TYPE $mage_run_type;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-php.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Prevent clients from accessing hidden files (starting with a dot)
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-shopware6.conf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ server {
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
http2_push_preload on;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-typo3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
6 changes: 6 additions & 0 deletions pkg/ddevapp/webserver_config_assets/nginx-site-wordpress.conf
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ server {
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
Expand Down

0 comments on commit 883ebe9

Please sign in to comment.