Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scanner returns HPE_HEADER_OVERFLOW at startup #64

Open
RichardDavies opened this issue Aug 25, 2023 · 5 comments
Open

Scanner returns HPE_HEADER_OVERFLOW at startup #64

RichardDavies opened this issue Aug 25, 2023 · 5 comments

Comments

@RichardDavies
Copy link

Recently when running lando start the scanner for one of our websites started returning red URLs with HPE_HEADER_OVERFLOW errors, despite the fact that the URLs all load just fine in the browser.
image

It appears this error is related to exceeding a max header size of 16 KB in Node.js.

Sure enough, I looked and our site had 17 KB of headers due to somewhat lengthy content-security-policy, surrogate-key, and x-drupal-cache-tags headers. I tried turning off the CSP header which reduced the size to about 16 KB and now the URLs are green again when I restart Lando.

Is there any way to adjust the max header size allowed by the scanner?

@RichardDavies RichardDavies added the bug Something isn't working label Aug 25, 2023
@AaronFeledy
Copy link
Collaborator

AaronFeledy commented Aug 26, 2023

Not sure if lando's built-in Node respects the environment variable, but does this work?

NODE_OPTIONS='--max-http-header-size=32000' lando start

@RichardDavies
Copy link
Author

No, that didn't work. I think that environment variable (or command line argument) needs to be set internally in Lando's scanner environment, but I don't know how to do that.

@AJV009
Copy link

AJV009 commented Sep 5, 2023

FACING THE SAME issue!

@RichardDavies
Copy link
Author

FYI I was able to work around this issue by configuring the URL scanner to check a different URL than my homepage. I pointed it to my login URL which has fewer HTTP headers since it's not cached.

.lando.yml

services:
  appserver_nginx:
    scanner:
      path: /user/login

@reynoldsalec
Copy link
Sponsor Member

Ah, that is interesting, going to move this over to the lando/core issues, would be nice to have some sort of way to work around long headers but still report back the response code.

@pirog pirog added Needs Triage and removed bug Something isn't working labels Sep 29, 2023
@pirog pirog transferred this issue from lando/lando Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants