A sneak peek at headless embedding in tech playground. Below are some exaples with NGINX, Caddy and Jinja
worker_processes 1;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
}
http {
include /etc/nginx/mime.types;
index index.html index.htm index.php;
server {
listen 80;
server_name basic;
access_log /dev/stdout;
location / {
proxy_pass http://httpbin.org;
}
location /deny {
deny all;
}
}
}
curl http://127.0.0.1/headers
:80 {
respond /deny* "Permission denied" 403
reverse_proxy httpbin.org:80
}
curl http://127.0.0.1/headers
curl http://127.0.0.1/deny
{%- if greet_user and username -%}
Hello {{ username }}!
{% endif -%}
Here is a list of your things:
{% for thing in things %}
- {{ thing }}
{%- endfor %}
username: Marco
greet_user: True
things:
- one
- two
- three