1

In my application, I am using GCDWebServer to run a reverse proxy server; however, it has been a couple of years since GCDWebServer has been updated, and with every iOS update, it becomes scarier to face breaking changes. Is it possible to migrate from GCDWebServer to a service like Vapor or anything else?

I really only have one main use case for GCDWebServer, which is intercepting HTTP Get Requests as such

private func addRequestHandler() {
    // Web Server - GCDWebServer()
    self.webServer.addHandler(
        forMethod: "GET",
        pathRegex: "^/.*\\\(encodingType.fileType)$",
        request: GCDWebServerRequest.self
    ) { [weak self] request, completion in
        // Handle Interception
        completion(GCDWebServerDataResponse(data: data, contentType: contentType))
    }
}
Michael Jajou
  • 312
  • 2
  • 13
  • 1
    Yes it's possible, take a look at https://www.raywenderlich.com/31498014-running-a-web-server-on-ios-with-vapor – 0xTim Sep 25 '22 at 04:29

0 Answers0