fix: resolve connectivity issues for Android and Web builds
- Android: Added INTERNET permission and enabled cleartext traffic in AndroidManifest.xml. - Web: Implemented and registered CORSMiddleware in backend to allow cross-origin requests. - Flutter: Updated SettingsProvider to use 10.0.2.2 as default for Android Emulator for easier local testing.
This commit is contained in:
@@ -11,6 +11,9 @@ func SetupRouter() *gin.Engine {
|
||||
|
||||
r := gin.Default()
|
||||
|
||||
// Use CORS middleware to allow web access
|
||||
r.Use(CORSMiddleware())
|
||||
|
||||
// 清除代理信任警告 "[WARNING] You trusted all proxies"
|
||||
r.SetTrustedProxies(nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user