mozilla-services / common-rs

Common utilities for Mozilla server side apps
Mozilla Public License 2.0
3 stars 9 forks source link

How to use actix-web-location with actix-web #50

Closed kprasadvnsi closed 1 year ago

kprasadvnsi commented 1 year ago

There is no example provided actix-web-location.

jrconlin commented 1 year ago

Sorry, this repo was meant mostly for internal consumption, so we didn't add a lot of documentation or examples, because we didn't think folk would use it.

The actix-web-location function is also fairly specific, and uses MaxMindDB or GCP location to resolve an IP to an approximate location. We use this library in services like our Context Tiles server (contile), and you can see one of the ways we use it in this test.

(We add Location as an automatic variable for request handlers, and the FromRequest impl autogenerates the value.)