Using nginx to mask the liveform url on your contact forms

You can use Nginx to mask the form id of your LiveForm url. Here is a configuration which lets you do that.

1
2
3
4
5
6
7
8
9
10
11
12
13
server {
server_name awesome.com;
# ....
location /form {
proxy_pass https://liveformhq.com/form/369c5f72-7940-4d20-b3c7-8a963fc49a15;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X_FORWARDED_PROTO $scheme;
}
}

Now you can just use the /form endpoint in your html. e.g.

1
2
<form method='post' action='/form'>
</form>