Skip to content

Conversation

@patrickhulce
Copy link
Collaborator

Summary
Often the HTTPS audit fails because the original URL audited was http, so even if it redirects then you still have the original redirect request over HTTP. We can kinda explain why this is desirable (though I'm not really sold it's worth the annoyance), but it's definitely not the case in HSTS internal redirects that happen in the browser, which is the whole point of HSTS. This applies to entire TLDs in some cases (.app/.dev), so we should handle those cases appropriately.

Related Issues/PRs
fixes #12674

@patrickhulce patrickhulce requested a review from a team as a code owner June 22, 2021 17:29
@patrickhulce patrickhulce requested review from adamraine and removed request for a team June 22, 2021 17:29
@google-cla google-cla bot added the cla: yes label Jun 22, 2021
if (!destination) return false;

const reasonHeader = record.responseHeaders
.find(header => header.name === 'Non-Authoritative-Reason');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha, I wonder how this header ended up with this name

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.4

non-authorative because the info (the redirect) comes from a third party (hsts list in the browser), not the intended origin

@patrickhulce patrickhulce merged commit 6de5b43 into master Jun 22, 2021
@patrickhulce patrickhulce deleted the hsts_secure branch June 22, 2021 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lighthouse doesn't automatically treat .app or .dev TLDs as HTTPS

5 participants