From 4bdc766bcb0a98363aa3fbda097f5982734b4747 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 5 Jun 2020 18:37:03 +0200 Subject: [PATCH] Update for HSTS compliance --- .idea/.idea.c3stream/.idea/contentModel.xml | 1 + .idea/.idea.c3stream/.idea/misc.xml | 6 ++++++ .idea/.idea.c3stream/.idea/projectSettingsUpdater.xml | 2 +- c3stream.cs | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .idea/.idea.c3stream/.idea/misc.xml diff --git a/.idea/.idea.c3stream/.idea/contentModel.xml b/.idea/.idea.c3stream/.idea/contentModel.xml index de56e30..fc8a047 100644 --- a/.idea/.idea.c3stream/.idea/contentModel.xml +++ b/.idea/.idea.c3stream/.idea/contentModel.xml @@ -1,6 +1,7 @@ + diff --git a/.idea/.idea.c3stream/.idea/misc.xml b/.idea/.idea.c3stream/.idea/misc.xml new file mode 100644 index 0000000..1d8c84d --- /dev/null +++ b/.idea/.idea.c3stream/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/.idea.c3stream/.idea/projectSettingsUpdater.xml b/.idea/.idea.c3stream/.idea/projectSettingsUpdater.xml index 7515e76..4bb9f4d 100644 --- a/.idea/.idea.c3stream/.idea/projectSettingsUpdater.xml +++ b/.idea/.idea.c3stream/.idea/projectSettingsUpdater.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/c3stream.cs b/c3stream.cs index 90dc9a6..9dba533 100644 --- a/c3stream.cs +++ b/c3stream.cs @@ -83,7 +83,8 @@ namespace c3stream { //if new bookmark is in uri if (resquest.Query.ContainsKey("bookmark") && resquest.Cookies["bookmark"] != resquest.Query["bookmark"]) { response.Cookies.Append("bookmark", resquest.Query["bookmark"], new CookieOptions {Expires = DateTimeOffset.MaxValue}); - response.Redirect(redirectUri + "bookmark=" + resquest.Query["bookmark"]); + //disabled for HSTS compliance + //response.Redirect(redirectUri + "bookmark=" + resquest.Query["bookmark"]); } //if no cookie exists or cookie is invalid else if (!resquest.Cookies.ContainsKey("bookmark") || !Guid.TryParseExact(resquest.Cookies["bookmark"], "D", out _)) {