Adding the preload flag would allow sites using this module to add themselves to the HSTS preload list.

CommentFileSizeAuthor
#4 2615872-preload.patch3.03 KBmfb

Comments

mfb created an issue. See original summary.

gnulux’s picture

Yes, I second that — that would be great. But, perhaps for Drupal 8, since the D7 module isn't minimally maintained.

I see that in WordPress, it only takes one line to add in functions.php:
header( 'Strict-Transport-Security: max-age=10886400; includeSubDomains; preload' );

But of course, I'm aware that Drupal and WP are very different.

And it ought to be optional perhaps, since, according to what I've read, if your HTTPS connexion runs into problems, your website is stuck to HTTPS through the preload enlistment and so may become unreachable (endless loop).
And getting into that preload list seems to take some months anyway.

Cheers

minoroffense’s picture

Assigned: mfb » Unassigned
mfb’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new3.03 KB

Status: Needs review » Needs work

The last submitted patch, 4: 2615872-preload.patch, failed testing.

mfb’s picture

Status: Needs work » Needs review

Hmm this patch was tested on the wrong branch for some reason.

minoroffense’s picture

Might be because the issue was first created on the 7.x branch. Let me try to create a new issue on 8.x and I'll upload your patch.

minoroffense’s picture

Figured it out. Didn't have tests enabled for 8.x

Anonymous’s picture

Tested (drupal 8) with and without preload flag with the help of https://en.internet.nl/.
Results are ok!

dsnopek’s picture

Status: Needs review » Reviewed & tested by the community

Works in my testing too!

minoroffense’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Applied to 8. Needs backport now.

Thanks everyone.

mfb’s picture

mfb’s picture

Status: Patch (to be ported) » Fixed

tagging this fixed as there is D7 issue @ #2916949: Add preload flag (D7)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

milindk’s picture

This patch working fine. tested with https://hstspreload.org/.