From 3437d9e88811caa30ac34c124a95d3d76ddfd8d2 Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Fri, 1 Mar 2019 00:29:15 -0600 Subject: [PATCH] Add preflight endpoint --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index b229d8d..55a540e 100755 --- a/server.js +++ b/server.js @@ -18,6 +18,7 @@ app.get( /weather(\d+)\.py/, weather.getWeather ); app.get( /(\d+)/, weather.getWeather ); // Handle requests matching /weatherData +app.options( /weatherData/, cors() ); app.get( /weatherData/, cors(), weather.showWeatherData ); app.get( "/", function( req, res ) {