server {
# Usual site configuration stuff here
location / {
# Add any other configuration for the main location here
if ($request_method = BREW) {
set $teapot 1;
}
if ($content_type = "application/coffee-pot-command") {
set $teapot "${teapot}1";
}
if ($teapot = 11) {
return 418 "I'm a teapot.";
}
}
# More usual site configuration here
}
Last active
January 30, 2025 07:06
-
-
Save questionlp/07ad5a8a3f68340fda8aaf8fd100312c to your computer and use it in GitHub Desktop.
Simple RFC 2324 Implementation in NGINX
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment