From ecd007fe4b125e620ef5117f86b4af94bc252679 Mon Sep 17 00:00:00 2001
From: Travis Rivers <trivers@contractor.usgs.gov>
Date: Tue, 25 Aug 2020 12:07:10 -0600
Subject: [PATCH] add CORS headers

---
 geomagio/api/secure/SessionMiddleware.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/geomagio/api/secure/SessionMiddleware.py b/geomagio/api/secure/SessionMiddleware.py
index 1138e079..252134e2 100644
--- a/geomagio/api/secure/SessionMiddleware.py
+++ b/geomagio/api/secure/SessionMiddleware.py
@@ -113,7 +113,8 @@ class SessionMiddleware:
         self, message: Message, value: str, max_age: int = None,
     ):
         headers = MutableHeaders(scope=message)
-        headers.append("Cache-Control", "no-cache")
+        headers.append("Cache-Control", "max-age=60")
+        headers.append("Access-Control-Allow-Origin", "*")
         headers.append(
             "Set-Cookie",
             f"{self.session_cookie}={value};"
-- 
GitLab