You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically, it'd be nice to have something like view's incidr function in the template plugin, especially for changing responses dynamically based on .Remote
Why is this needed:
My use case is that I want to change a whole list of hostnames to return a specific IP address, but it needs to be different based on the IP of the requestor (so that their path to the resource is correct) because my server sits on multiple different networks, so each network's hosts need to connect to it via the correct network-local IP.
I could implement this with view instead, but then I have to maintain several server blocks instead of just a slightly more complex template 👀
The text was updated successfully, but these errors were encountered:
In case it helps someone else, I ended up with a solution where I have a single top-level hostname that I use view to vary the response to based on client IP, and then my more complex blocks can simply CNAME to that top-level hostname and get the desired behavior. This does mean an extra hop in all the responses and an extra exposed hostname, but it works reasonably well.
I do still think it'd be cleaner/better to have support for more useful template functions in template 😄 ❤️
What would you like to be added:
Specifically, it'd be nice to have something like
view
'sincidr
function in thetemplate
plugin, especially for changing responses dynamically based on.Remote
Why is this needed:
My use case is that I want to change a whole list of hostnames to return a specific IP address, but it needs to be different based on the IP of the requestor (so that their path to the resource is correct) because my server sits on multiple different networks, so each network's hosts need to connect to it via the correct network-local IP.
I could implement this with
view
instead, but then I have to maintain several server blocks instead of just a slightly more complextemplate
👀The text was updated successfully, but these errors were encountered: