NEW 199439
Force HSTS for sites that doesn't support HTTPS
https://bugs.webkit.org/show_bug.cgi?id=199439
Summary Force HSTS for sites that doesn't support HTTPS
Mykola Dekhtiarenko
Reported 2019-07-03 05:36:07 PDT
Here is the situation: there two web pages on the same host but on different ports and first one has HTTPS and other one doesn't. After visiting the one that has HTTPS it's impossible to reach second one because safari forces https for all of the webpages with same host without considering port.
Attachments
Alexey Proskuryakov
Comment 1 2019-07-03 10:21:53 PDT
This sounds like how HSTS is supposed to work. What exactly do you see as a WebKit bug here?
Mykola Dekhtiarenko
Comment 2 2019-07-04 04:41:14 PDT
The problem here that it's not the same site. One is the real system we are developing(this is the one that has HTTPS) and another one is just some kind of mock system that provides different stubs for third party system we are using. This mock system has web page that was made to configure it's behavior and after first visit of real system there is no way to reach mock one because safari forces HTTPS there. By the way, I checked this case on Chrome and Firefox and I was able to reach mock one after visiting the one with the real system.
Brent Fulgham
Comment 3 2019-07-04 13:58:15 PDT
And the site is not setting the upgrade insecure request or HSTS headers? This could be due to a safari feature that will preferentially visit the HTTPS version of the site once it knows it exists. Have you tried deleting website data for the origin?
Mykola Dekhtiarenko
Comment 4 2019-07-08 04:33:24 PDT
I have checked responses and yes, origin returns "Strict-Transport-Security: max-age=31536000; includeSubDomains" header. I've deleted website data and it haven't helped. To stop such behavior I should also delete HSTS.plist file but it works only until visiting original one. If it's expected behavior is it any switch or extension with which it's possible to turn it off for testing purpose? And I should mention this again it behaves like that only in Safari, so, I just wonder why is it different?
Note You need to log in before you can comment on or make changes to this bug.