Skip to content

FR: Also expose placeholders for geo ip information #6

Open
@melink14

Description

@melink14

I was looking at caddy geoip capabilities so I could augment my access logs with location information (for later processing and monitoring) and it seems like this plugin is the only geolocation plugin that was ported to caddy v2.

caddy v1 had https://github.com/aablinov/caddy-geoip which exposed placeholders and I think this plugin is best situated to do something similar.

There might be an issue of redundancy since once you define placeholders then one could use either the custom matchers already defined by the plugin or just use expression to create any condition they want using the value of the placeholders.

(On the other hand, it would make extensions like #3 to implement since no expression syntax would need to change)

It seems like using a handler to add placeholders is pretty easy but it is a bit of a philosophical change vs having a matcher. My own opinion is providing placeholders is more elegant software solution but then we'd have to worry about migration.

Let me know what you think!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions