From 4d7298e6693c4a895252059f259dda576701dc69 Mon Sep 17 00:00:00 2001 From: Melson Zacharias Date: Sat, 12 Jan 2019 23:29:06 +0530 Subject: [PATCH] Prevent propagation of OPTION request --- Sources/PostgresSessionDriver.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/PostgresSessionDriver.swift b/Sources/PostgresSessionDriver.swift index c70558a..970171b 100644 --- a/Sources/PostgresSessionDriver.swift +++ b/Sources/PostgresSessionDriver.swift @@ -95,6 +95,9 @@ extension SessionPostgresFilter: HTTPRequestFilter { } CORSheaders.make(request, response) + if request.method == .options { + callback(HTTPRequestFilterResult.halt(request, response)) + } } } callback(HTTPRequestFilterResult.continue(request, response))