website/docs: update geoip and asn example to use the proper syntax (#10249) Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
committed by
GitHub
parent
2996f20b74
commit
17acc9457d
@ -56,13 +56,13 @@ import Objects from "../expressions/_objects.md";
|
||||
- `geoip`: GeoIP object, see [GeoIP](https://geoip2.readthedocs.io/en/latest/#geoip2.models.City)
|
||||
|
||||
```python
|
||||
return context["geoip"].country.iso_code == "US"
|
||||
return context["geoip"]["country"]["iso_code"] == "US"
|
||||
```
|
||||
|
||||
- `asn`: ASN object, see [GeoIP](https://geoip2.readthedocs.io/en/latest/#geoip2.models.ASN)
|
||||
|
||||
```python
|
||||
return context["asn"].autonomous_system_number == 64496
|
||||
return context["asn"]["autonomous_system_number"] == 64496
|
||||
```
|
||||
|
||||
- `ak_is_sso_flow`: Boolean which is true if request was initiated by authenticating through an external provider.
|
||||
|
||||
Reference in New Issue
Block a user