Problem/Motivation
Running update.php under SSL behind a reverse proxy doesn't work. Reverse proxy settings from settings.php don't appear to be respected. I'm running a Drupal 8 site on Acquia, and the request header overrides aren't working on update.php. This appears to be happening because middleware (including ReverseProxyMiddleWare) isn't running on the request.
Proposed resolution
Not sure... Either pull the logic from ReverseProxyMiddleWare into update.php, or run selected middlewares on update.
Remaining tasks
Come up with an approach and implement it.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2618606-2.patch | 1 KB | dawehner |
Comments
Comment #2
dawehnerI'm curious whether this fixes the problem for you ...
Comment #3
rbayliss commentedYup, that worked. I guess we need a test for this?
Comment #4
dawehnerPuh yeah why not, but it could be hard to actually test it.
Comment #10
mithenks commentedComment #12
chris burge commentedI can confirm patch #2 resolves this issue. I have a D8 site sitting behind a reverse proxy and was having the same issues with update.php.
Comment #13
jenlamptonI can also confirm this fixes the issue with running update.php with all the appropriate permissions, on a Drupal 8 site, on Acquia hosting, as documented here: https://www.drupal.org/project/drupal/issues/2955678
Comment #14
alexpottThis is an interesting problem. This suggests the ban middleware is also not firing. :(
I think we need to be able to mark certain middleware as update-safe and they should be fired. As this is a really issue that is breaking sites I think it is okay to do this in a follow-up but there is indicative of a wider problem with the shortcut that is the UpdateKernel.
Comment #15
alexpottCrediting @rbayliss for opening the issue.
Committed and pushed 46f02154f8 to 8.7.x and e839a9726a to 8.6.x. Thanks!
Backported to 8.6.x because not being able to run updates is a security issue.
Didn't ask for tests because this is difficult and there are unit tests of ReverseProxyMiddleware already.