From 87a8624a0b4913edd7943d153d30df2593daeaab Mon Sep 17 00:00:00 2001
From: Klas Arvidsson <klas.arvidsson@liu.se>
Date: Thu, 16 Jan 2020 18:45:05 +0100
Subject: [PATCH] updated squid filter rules

---
 files/squid/helpers/rules.d/opendsa.rules |  4 +---
 files/squid/helpers/rules.d/python.rules  | 12 ++++++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/files/squid/helpers/rules.d/opendsa.rules b/files/squid/helpers/rules.d/opendsa.rules
index 902b587..85ab98f 100644
--- a/files/squid/helpers/rules.d/opendsa.rules
+++ b/files/squid/helpers/rules.d/opendsa.rules
@@ -2,9 +2,7 @@
 
 // New setup on tentix
 
-^https?://www\.ida\.liu\.se/edu/ugrad/datortenta/OpenDSA/Books/TDDI16_190827/.*  true
-^https?://www\.ida\.liu\.se/edu/ugrad/datortenta/OpenDSA/Books/TDDE22_190827/.*  true
-^https?://www\.ida\.liu\.se/edu/ugrad/datortenta/OpenDSA/Books/TDDD86[AB]_191219/.*  true
+^https?://www\.ida\.liu\.se/edu/ugrad/datortenta/OpenDSA/Books/.*                false
 ^https?://www\.ida\.liu\.se/edu/ugrad/datortenta/OpenDSA/lib/.*                  true
 ^https?://www\.ida\.liu\.se/edu/ugrad/datortenta/OpenDSA/JSAV/.*                 true
 ^https?://www\.ida\.liu\.se/edu/ugrad/datortenta/OpenDSA/AV/.*                   true
diff --git a/files/squid/helpers/rules.d/python.rules b/files/squid/helpers/rules.d/python.rules
index 77149fa..179b9d7 100644
--- a/files/squid/helpers/rules.d/python.rules
+++ b/files/squid/helpers/rules.d/python.rules
@@ -1,5 +1,9 @@
 // Python library reference
-^https?://docs\.python\.org/3/library/.*            true
-^https?://docs\.python\.org/3/_static/.*            true
-^https?://docs\.python\.org/3/search\.html\?.*      true
-^https?://docs\.python\.org/3/searchindex\.js$      true
+^https?://docs\.python\.org/3(\.[0-9]{1,2})?/library/.*            true
+^https?://docs\.python\.org/3(\.[0-9]{1,2})?/_static/.*            true
+^https?://docs\.python\.org/3(\.[0-9]{1,2})?/search\.html\?.*      true
+^https?://docs\.python\.org/3(\.[0-9]{1,2})?/searchindex\.js$      true
+
+// extra for TDDE24 2020-01-17
+^https?://docs\.python\.org/3(\.[0-9]{1,2})?/reference/.*          true
+^https?://docs\.python\.org/3(\.[0-9]{1,2})?/genindex(-[A-Za-z0-9_])?\.html        true
-- 
GitLab