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

fix(service-worker): ignore passive mixed content requests #25994

Closed
wants to merge 1 commit into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Sep 18, 2018

PR Checklist

PR Type

[x] Bugfix

What is the current behavior?

Passive mixed content requests (like images) result in an error. This is a ServiceWorker limitation. Without the ServiceWorker, such requests only produce a warning. See #23012 (comment) for more details.

Issue Number: #23012

What is the new behavior?

The ServiceWorker will ignore such requests and let them be handled by the browser directly.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Fixes #23012.

@gkalpak gkalpak added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release area: service-worker Issues related to the @angular/service-worker package labels Sep 18, 2018
@gkalpak gkalpak requested a review from alxhub September 18, 2018 08:02
@mary-poppins
Copy link

You can preview ab01ebc at https://pr25994-ab01ebc.ngbuilds.io/.

@gkalpak gkalpak force-pushed the fix-sw-passive-mixed-content branch 2 times, most recently from ea58b3b to ba751f0 Compare September 18, 2018 08:27
@mary-poppins
Copy link

You can preview ba751f0 at https://pr25994-ba751f0.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 805c538 at https://pr25994-805c538.ngbuilds.io/.

@gkalpak gkalpak force-pushed the fix-sw-passive-mixed-content branch from 805c538 to b8ced23 Compare January 16, 2019 15:57
@gkalpak gkalpak requested a review from a team as a code owner January 16, 2019 15:57
@mary-poppins
Copy link

You can preview b8ced23 at https://pr25994-b8ced23.ngbuilds.io/.

@ngbot ngbot bot added this to the needsTriage milestone Jan 16, 2019
Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

thanks for great commit message!

@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 2, 2019
@IgorMinar IgorMinar removed the request for review from alxhub March 2, 2019 10:10
@IgorMinar
Copy link
Contributor

this PR needs a rebase to drop the pull approve pending check - otherwise lgtm

@IgorMinar IgorMinar added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Mar 2, 2019
@IgorMinar
Copy link
Contributor

merge-assistance: please rebase before merging and verify that the CI is still green, if not please ask @gkalpak to help

Although [passive mixed content][1] requests (like images) only produce
a warning without a ServiceWorker, fetching it via a ServiceWorker
results in an error. See
angular#23012 (comment)
for more details.

This commit makes the ServiceWorker ignore such requests and let them be
handled by the browser directly to avoid breaking apps that would work
without the ServiceWorker.

[1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content

Fixes angular#23012
@AndrewKushnir AndrewKushnir added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Mar 4, 2019
@AndrewKushnir AndrewKushnir removed the action: merge The PR is ready for merge by the caretaker label Mar 4, 2019
@AndrewKushnir
Copy link
Contributor

@gkalpak I've rebased this PR on top of the latest master. Could you please have a quick look at the changes to see if everything looks good and put the "merge" label back? Thank you.

@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Mar 4, 2019
@gkalpak
Copy link
Member Author

gkalpak commented Mar 4, 2019

@AndrewKushnir, looks good. Thx!

AndrewKushnir pushed a commit that referenced this pull request Mar 4, 2019
Although [passive mixed content][1] requests (like images) only produce
a warning without a ServiceWorker, fetching it via a ServiceWorker
results in an error. See
#23012 (comment)
for more details.

This commit makes the ServiceWorker ignore such requests and let them be
handled by the browser directly to avoid breaking apps that would work
without the ServiceWorker.

[1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content

Fixes #23012

PR Close #25994
@gkalpak gkalpak deleted the fix-sw-passive-mixed-content branch March 5, 2019 12:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: service-worker Issues related to the @angular/service-worker package cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note risk: low target: patch This PR is targeted for the next patch release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to load HTTP resource in live URL
6 participants