block certain paths unauthed
This commit is contained in:
parent
21373eed25
commit
e10bdbca0b
1 changed files with 4 additions and 3 deletions
|
|
@ -48,15 +48,16 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# We may want to include regular commits, e.g. https://git.federated.nexus/Henry-Hiles/nixos/commit/21373eed250ba70ff195258d3b5a4fe039f72779, but currently this doesn't seem needed
|
||||||
caddy.virtualHosts."${domain}".extraConfig = ''
|
caddy.virtualHosts."${domain}".extraConfig = ''
|
||||||
respond /robots.txt <<EOF
|
respond /robots.txt <<EOF
|
||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /*/*/*/commit
|
Disallow: /*/*/*/commit*
|
||||||
EOF 200
|
EOF 200
|
||||||
|
|
||||||
@commitAnonymous {
|
@commitAnonymous {
|
||||||
path /*/*/src/commit*
|
path_regexp commit ^/[^/]+/[^/]+/[^/]+/commit(?:/.*)?$
|
||||||
not header_regexp Cookie "(^|;\s*)session=[^;]+(?:;|$)"
|
not header_regexp Cookie "(^|;[[:space:]]*)session=[^;]+(;|$)"
|
||||||
}
|
}
|
||||||
|
|
||||||
redir @commitAnonymous /user/login?redirect_to={uri} 302
|
redir @commitAnonymous /user/login?redirect_to={uri} 302
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue