Thank you for sharing this code.
Slightly modified for Add-on: NGINX Home Assistant SSL proxy
location /api/webhook {
proxy_pass http://homeassistant.local.hass.io:%%HA_PORT%%$request_uri;
proxy_method POST; # this is the magic change, sets method as POST
proxy_set_header Host $host;
proxy_redirect http:// https://;
# for some reason i got application/octet-stream as a response so i added this to fix it
proxy_hide_header Content-Type;
add_header Content-Type text/plain;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}