swifter icon indicating copy to clipboard operation
swifter copied to clipboard

CORS for files

Open DawsonSeibold opened this issue 8 years ago • 0 comments

I have looked at the other issues that involve adding CORS to the server but they didn't help.

One of the other issue's answer was the following, Is there any way to use the .ShareDirectory features with it?

server["/cors"] = { _ in
        return .raw(200, "OK", ["Access-Control-Allow-Origin": "*"], { writer in
            try? writer.write([UInt8]("hello".utf8))
        })
    }

DawsonSeibold avatar Jul 24 '17 16:07 DawsonSeibold