swifter icon indicating copy to clipboard operation
swifter copied to clipboard

ios http server cannot be visited by ip via local area network

Open SuperXiChenXi opened this issue 5 years ago • 4 comments

I use this lib to start a server on iPhone, it works well on iPhone 7 plus

do {
            server["/hello"] = { .ok(.htmlBody("You asked for \($0)"))  }
            try server.start(8080)      
        } catch {
            NSLog("Server start error: \(error)")
        }

But on other phones(such as XSMax Pro OS:13.3.1), I met confused problem, I can visit 127.0.0.1:8080/hello, it works well via iPhone Safari,

But when I use ip such as 192.168.0.41:8080/hello, it cannot work. Could you let me know why? Any help will be appreciated!

SuperXiChenXi avatar Jan 12 '21 07:01 SuperXiChenXi

Same.

buhe avatar Feb 03 '23 10:02 buhe

Same.

Noraaa1 avatar Jun 27 '24 04:06 Noraaa1