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

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:
gcp-cherry-pick-bot[bot]
2024-06-26 22:07:25 +09:00
committed by GitHub
parent 2996f20b74
commit 17acc9457d
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.