-
Notifications
You must be signed in to change notification settings - Fork 120
Force https for jetpack sites #16279
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
Conversation
|
|
0af580e to
7adf54f
Compare
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @adborbas, Thx for the fix.
I'm not sure how to follow these testing steps:
- Start the app without mokcing and look for the https://public-api.wordpress.com/rest/v1.1/me/sites request.
- Set up a local map for that URL and mock the /sites/<the_site_you_load_if_multiple>/URL propery for use the http version of the site URL.
Could you please describe what to do there in detail?
|
@RafaelKayumov I've updated the steps. Could you please see them again? Please let me know if they need more adjustments. |
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my side I had to open sites selected to trigger the sites request that delivers the URL parameter.
LGTM. Works as described.

Closes WOOMOB-1529
Description
Force https scheme for siteAddress.
The fix ensures that when creating a JetpackSite from a Site, the URL always uses the https scheme. This logic lives in a small private extension (jetpackCanonicalURL), which felt like the right place since it’s well-contained and only runs once (or at most a few times).
I considered a more elaborate approach using a request retrier that would detect ATS failures, retry with https, and persist that preference on the Site for future requests. However, that felt overly complex for such rare cases, so I opted for this simpler and more predictable solution.
Steps to reproduce
This one is a bit tricky as it requires fiddling with the site settings in NetworkAdmin, so instead I'd suggest mocking a network response in ProxyMan.
trunkbranch. Build and launch the app locally while connected to Proxyman or any other network monitoring tool.https://public-api.wordpress.com/rest/v1.1/me/sites?...request. Which should contain a response object{ "sites": [ { "ID": 000000000, "name": "Buy cheap stuff expensive", "description": "", "URL": "https://<your-site>.com",URLproperty to usehttpinstead ofhttps. So turntrunkis broken.Testing information
Tested with iPhone 17 Pro iOS 26 on both simulator and device.
Screenshots
RELEASE-NOTES.txtif necessary.