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(peers): chrome regression and update ipfs-geoip to v9.2 #2333

Merged
merged 2 commits into from
Feb 24, 2025
Merged

Conversation

lidel
Copy link
Member

@lidel lidel commented Feb 19, 2025

https://github.com/ipfs-shipyard/ipfs-geoip/releases/tag/v9.2.0 updates Peers screen to use dataset from 2025-02-18.

This fixes most of invalid country flags that suggest libp2p is breaking the speed of light ;-)

  • CI green
  • confirm manually that flags load ok on Peers screen (in empty browser profile, to avoid cached results)
    • fixed Chrome bug on Peers screen (forcing https:// on localhost redirect) in 0310932

?format=raw does not benefit from origin isolation,
bu switching to raw IP we use path gateway and return payload
immediatelly + avoid issue with chrome upgrading to https://
@lidel lidel changed the title fix: update ipfs-geoip to v9.2 fix(peers): chrome regression and update ipfs-geoip to v9.2 Feb 19, 2025
Comment on lines +237 to +239
// Normalize Gateway URLS:
// switch localhost to raw IP to avoid subdomain redirect AND avoid Chrome forcing https:// on such redirect
gatewayUrls = (Array.isArray(gatewayUrls) ? gatewayUrls : [gatewayUrls]).map(url => url.replace(/localhost:(\d+)/, '127.0.0.1:$1'))
Copy link
Member Author

@lidel lidel Feb 19, 2025

Choose a reason for hiding this comment

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

ℹ️ At some point Chrome started normalizing HTTP 301 to use https:// instead of http://, even if the origin is localhost. This broke Flags on Peers screen, but we did not notice because most of flags were locally cached in IndexDB and was not immediately obvious it stopped working.

@SgtPooki (just FYI) this PR includes a localized fix for flags on Peers screen but may be useful to know about the bug if it surfaces elsewhere.

@lidel lidel marked this pull request as ready for review February 19, 2025 16:37
@lidel lidel requested a review from a team as a code owner February 19, 2025 16:37
@lidel lidel mentioned this pull request Feb 19, 2025
47 tasks
@lidel lidel merged commit 699f735 into main Feb 24, 2025
21 checks passed
@lidel lidel deleted the update-geoip branch February 24, 2025 19:07
ipfs-gui-bot pushed a commit that referenced this pull request Feb 25, 2025
## [4.5.0](v4.4.2...v4.5.0) (2025-02-25)

 CID `bafybeiata4qg7xjtwgor6r5dw63jjxyouenyromrrb4lrewxrlvav7gzgi`

 ---

### Features

* add QR Code to ShareModal ([#2320](#2320)) ([5dbccfd](5dbccfd))

### Bug Fixes

* add hint about basic http auth for rpc ([#2338](#2338)) ([7d00889](7d00889))
* **ci:** cluster pinning with timeout and retry ([#2321](#2321)) ([9007e98](9007e98))
* **ci:** typo in ci.yml ([7fbb51b](7fbb51b))
* **peers:** chrome regression and update ipfs-geoip to v9.2 ([#2333](#2333)) ([699f735](699f735))

### Trivial Changes

* add console warning ([#2332](#2332)) ([76a0c52](76a0c52))
* **deps:** bump actions/setup-go from 4 to 5 ([#2221](#2221)) ([412b89f](412b89f))
* pull transifex translations ([#2331](#2331)) ([e62b487](e62b487))
@ipfs-gui-bot
Copy link
Collaborator

🎉 This PR is included in version 4.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants