website/docs: update geoip and asn example to use the proper syntax (#10249)

This commit is contained in:
Marc 'risson' Schmitt
2024-06-26 14:40:41 +02:00
committed by GitHub
parent d575eb8dcc
commit 7cadcbfa06
2 changed files with 8 additions and 2 deletions

View File

@ -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.