fix: migrate default NGA backend - #392
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates MNGA’s default NGA backend to avoid redirect-related auth loss by switching the default host from nga.178.com to bbs.nga.cn, and migrates stored legacy/empty backend settings to the new default across both the Rust logic module and the Swift app.
Changes:
- Change Rust logic default
DEFAULT_BASE_URLtohttps://bbs.nga.cnand migrate legacy/empty persisted base URLs duringset_request_option. - Update Swift URL defaults and backend picker host list, plus migrate persisted legacy/empty backend settings on app startup.
- Simplify CI tool installation by using
jdx/mise-actionto provisiontuistinstead of Homebrew formula installation.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| logic/service/src/request.rs | Adds legacy/empty base URL normalization and a focused unit test. |
| logic/service/src/constants.rs | Switches Rust logic default backend host to bbs.nga.cn. |
| app/Shared/Utilities/WhatsNew.swift | Bumps “What’s New” entry version to 2.3.1. |
| app/Shared/Utilities/URLs.swift | Updates Swift default backend host and curated host options list. |
| app/Shared/Storage/PreferencesStorage.swift | Migrates stored backend setting when empty or pointing at the legacy host. |
| app/Project.swift | Bumps MARKETING_VERSION to 2.3.1. |
| .github/workflows/release.yaml | Uses mise-action to install tuist instead of Homebrew. |
| .github/workflows/ios_debug.yaml | Uses mise-action to install tuist instead of Homebrew. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
nga.178.comtobbs.nga.cnin Rust logic and Swift URL defaults.https://nga.178.combackend settings to the new default.Why
nga.178.comnow redirects API traffic tobbs.nga.cn. MNGA sends auth through POST form fields, and the redirect path can lose those fields before the request reaches the final host, causing NGA to report未登录or request errors.Validation
cargo fmtcargo test -p service request::test::test_normalize_base_url -- --exactcargo test -p service test_topic_list -- --ignored --nocapturecargo clippy