From eb2762e3ff37c7ca2d30c2e18db02fdaab08d852 Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Mon, 2 Apr 2018 01:19:01 -0500 Subject: [PATCH] server: Add CORSFilter This simplifies the development process and allow us to load the application via http. --- server/conf/application.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/conf/application.conf b/server/conf/application.conf index f4ce5db..eb03550 100644 --- a/server/conf/application.conf +++ b/server/conf/application.conf @@ -13,8 +13,14 @@ play.http { secret.key=${?PLAY_APPLICATION_SECRET} } +play.filters.enabled += "play.filters.cors.CORSFilter" play.filters.enabled += "com.xsn.explorer.play.LoggingFilter" +play.filters.cors { + allowedOrigins = ["http://xsnexplorer.io", "http://localhost:4200"] + allowedHttpMethods = ["GET"] +} + rpc { host = "http://localhost:51473" username = "dummy"