Replies: 7 comments
-
Yes, ironically somebody has been working on this in recent days. You're exactly right about the technique. It has to be global... if it's for the router. |
Beta Was this translation helpful? Give feedback.
-
BTW, we should probably just bump it, since two people have wanted that in recent days. The other technique is to do a PR, we push the image with the changed value, and you add the image into your ~/.ddev/router-compose.newimage.yaml |
Beta Was this translation helpful? Give feedback.
-
I think doubling In case this helps anyone-- I wanted to put my nginx config workaround for router in my project-level config (so devs working on a project would have the workaround applied w/o manual intervention), so I used pre-start hooks on the project-level to copy Additional discussion on this topic found in Drupal Slack's #ddev channel: https://drupal.slack.com/archives/C5TQRQZRR/p1607733440364600 |
Beta Was this translation helpful? Give feedback.
-
Related PR #2698 @TravisWhitehead if you got your workaround to work could you explain it and put it here? |
Beta Was this translation helpful? Give feedback.
-
So I'm starting to doubt However it might still be a reasonable default for others. My new workaround is to just disable HTTP/2 until I'll have time to dig into this more. A hack to disable HTTP/2 without having to mount over
It's a fragile solution, it would probably be nicer to have the option of disabling HTTP/2 as a proper ddev configuration that propagates to |
Beta Was this translation helpful? Give feedback.
-
Meanwhile, my previous workaround was to use diff --git a/.ddev/config.yaml b/.ddev/config.yaml
index d1e3db99..cdc326a3 100644
--- a/.ddev/config.yaml
+++ b/.ddev/config.yaml
@@ -14,6 +14,10 @@ mariadb_version: ""
mysql_version: "5.7"
provider: default
hooks:
+ pre-start:
+ # ddev-router config patching only works in global ddev config, so we copy files there
+ - exec-host: cp .ddev/nginx_http2_max_header_size.conf ~/.ddev/
+ - exec-host: cp .ddev/router-compose.nginx_http2_max_header_size_conf.yaml ~/.ddev/
post-import-db:
- exec: drush updb -y
- exec: drush en stage_file_proxy devel module_filter permissions_helper -y
diff --git a/.ddev/nginx_http2_max_header_size.conf b/.ddev/nginx_http2_max_header_size.conf
new file mode 100644
index 00000000..a3943086
--- /dev/null
+++ b/.ddev/nginx_http2_max_header_size.conf
@@ -0,0 +1,4 @@
+# This file only works in global ddev config, so the pre-composer hook copies to there.
+# Double limits for when our cookies get too big
+http2_max_header_size 32k;
diff --git a/.ddev/router-compose.nginx_http2_max_header_size_conf.yaml b/.ddev/router-compose.nginx_http2_max_header_size_conf.yaml
new file mode 100644
index 00000000..ce3ddd74
--- /dev/null
+++ b/.ddev/router-compose.nginx_http2_max_header_size_conf.yaml
@@ -0,0 +1,7 @@
+# Add custom nginx config to ddev-router
+# This file only works in global ddev config, so the pre-composer hook copies to there.
+ version: '3.6'
+ services:
+ ddev-router:
+ volumes:
+ - ./nginx_http2_max_header_size.conf:/etc/nginx/conf.d/00_nginx_http2_max_header_size.conf |
Beta Was this translation helpful? Give feedback.
-
#2698 went in for this to double the http2_max_header_size and will be in v1.17 alphas and then v1.17, but people may need the technique above someday in the future as well. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to increase http2_max_header_size for the ddev-router? We have instances where it needed to be bumped to 32k.
It looks like the only way is to create a new
.ddev/router-compose.*.yml
which adds a custom.conf
in a volume mount to/etc/nginx/conf.d/
.I'm fine with it being a global change, but I was wondering if there was an easier way
Beta Was this translation helpful? Give feedback.
All reactions