Changes the master location to first send it through a javascript guard function that determines if the URI is acceptable. Thereby disallowing requests such as secrets and configmaps.
nginx.js
proxyMasterGuard function that checks the given uri against a set of accepted patterns.
If pattern not found then return a 502 and error message.
If found then internally redirect to the masterinternal location
test.js
Adds tests to check syntax and exercise proxyMasterGuard
nginx-gateway.conf.template
nginx.js
test.js