Skip to content

Commit

Permalink
feat: restrict /v1/account endpoint to naarad-signup; install jq for …
Browse files Browse the repository at this point in the history
…log parsing
  • Loading branch information
proffapt committed Jun 30, 2024
1 parent 19e4946 commit 13c2b7b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM binwiederhier/ntfy

RUN apk --no-cache add jq

# Copy metaploy configuration
COPY metaploy/naarad.metaploy.conf /
COPY metaploy/postinstall.sh /
Expand Down
9 changes: 8 additions & 1 deletion metaploy/naarad.metaploy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ server {

location ~ ^/([^/]+)/json(/|$) {
proxy_pass http://naarad;
add_header Content-Type application/json;
add_header Content-Type application/json;
}

location /v1/account {
valid_referers https://naarad-signup.metakgp.org;
if ($invalid_referer) {
return 307 https://naarad-signup.metakgp.org;
}
}

location /signup {
Expand Down

0 comments on commit 13c2b7b

Please sign in to comment.