summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2019-05-21 10:08:49 -0500
committerOmar Roth <omarroth@protonmail.com>2019-05-21 10:08:49 -0500
commit267bf289c494b405ef6da81dd754731b3df0a709 (patch)
tree474b376556723dd2ba61fb5826218d51b47ee261
parentb3e083d866f92d2ead012173c5735ab605239f96 (diff)
downloadinvidious-267bf289c494b405ef6da81dd754731b3df0a709.tar.gz
invidious-267bf289c494b405ef6da81dd754731b3df0a709.tar.bz2
invidious-267bf289c494b405ef6da81dd754731b3df0a709.zip
Exclude /api/v1/auth/notifications from middleware
-rw-r--r--src/invidious/helpers/handlers.cr5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/invidious/helpers/handlers.cr b/src/invidious/helpers/handlers.cr
index 4e73df51..216f9b5d 100644
--- a/src/invidious/helpers/handlers.cr
+++ b/src/invidious/helpers/handlers.cr
@@ -63,7 +63,7 @@ end
class FilteredCompressHandler < Kemal::Handler
exclude ["/videoplayback", "/videoplayback/*", "/vi/*", "/ggpht/*", "/api/v1/auth/notifications"]
- exclude ["/data_control"], "POST"
+ exclude ["/api/v1/auth/notifications", "/data_control"], "POST"
def call(env)
return call_next env if exclude_match? env
@@ -139,7 +139,8 @@ class APIHandler < Kemal::Handler
{% for method in %w(GET POST PUT HEAD DELETE PATCH OPTIONS) %}
only ["/api/v1/*"], {{method}}
{% end %}
- exclude ["/api/v1/auth/notifications"]
+ exclude ["/api/v1/auth/notifications"], "GET"
+ exclude ["/api/v1/auth/notifications"], "POST"
def call(env)
return call_next env unless only_match? env