diff --git a/.drone.yml b/.drone.yml
index cdd46d0..bd03659 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -28,7 +28,7 @@ steps:
- SITE=coderdojo
tags: coderdojo-${DRONE_BRANCH}
-- name: deploy angestoepselt staging
+- name: deploy angestoepselt stage
image: plugins/webhook
settings:
urls:
@@ -37,7 +37,7 @@ steps:
- build angestoepselt site
when:
branch:
- - captcha
+ - stage
- name: deploy live build
image: plugins/webhook
@@ -75,4 +75,6 @@ steps:
trigger:
branch:
- main
- - captcha
+ - stage
+ event:
+ - push
\ No newline at end of file
diff --git a/README.md b/README.md
index 6472481..9eacfed 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ npm run build:styles
SITE=angestoepselt npm run dev:site
```
-Go to , which will update live when content changes
+Go to , which will update live when content changes
(the initial build may take some time to render out the different image sizes).
If you make style changes, make sure to recompile the CSS files with the second
of the above commands. Alternatively, run `npm run dev:styles` in an additional
diff --git a/cgi-bin/form.py b/cgi-bin/form.py
index d3832cc..15c0dab 100755
--- a/cgi-bin/form.py
+++ b/cgi-bin/form.py
@@ -61,18 +61,24 @@ match os.environ.get("REQUEST_METHOD", "").upper():
case "GET":
# For GET requests, serve the form that the user requested. The CSRF
# token will be added here as well.
- print("Status: 200")
- print("Content-Type: text/html")
+
+ form_disabled = request_uri.startswith("/computer-beantragen/privat")
+
+ print(f"Status: {200 if not form_disabled else 503}")
+ print(f"Content-Type: text/html")
print(f"Set-Cookie: __Host-csrftoken={signed_csrf_token}; path=/; Secure; SameSite=Strict; HttpOnly")
print("")
with open(f"{SITE_DIRECTORY}/{request_uri.strip('/')}/index.html", "r") as template:
for line in template.readlines():
- # This is a very rudimentary check to ensure that we actually
- # place the token *inside* the form. It assumes that there is
- # a) only one form on the site and
- # b) the