oltdaniel / caddy-ipinfo-free

integrate the free ipinfo database into caddy
MIT License
10 stars 1 forks source link

very useful #1

Closed gedw99 closed 4 months ago

gedw99 commented 4 months ago

Hey @oltdaniel

this looks very useful. I am doing ASN and BGP anycast with caddy and would like to add it to xtemplate

https://github.com/infogulch/xtemplate https://github.com/infogulch/xtemplate-caddy

then ipinfo can have a easy to maintain web gui.

I raise this because the reverse is also true. If you import template its very easy to add a Web GUI and DB for any Caddy Module like yours.

oltdaniel commented 4 months ago

Hi,

Thanks for the feedback and the new kind of application in which this module can be used.

However, Caddy supports something similar with the standard templates directive. You can simply access the placeholder values exposed by this module by using {{ placeholder "ipinfo_free.country" }}.

Thereby I suggest, to implement such a template function in https://github.com/infogulch/xtemplate-caddy as this would not only support my module but any other using placeholder variables.

I can implement such a function if requested, just to learn something new and this is really easy to do anyway.

Due to these reasons, I will close this issue for now.