Skip to content

Make GeoIP centroid fallback jitter deterministic #203

Description

@SebastienMelki

Context

From PR #106 re-review (NEW-8): The country centroid fallback in server/worldmonitor/cyber/v1/_shared.ts adds random jitter via Math.random(). The same threat from the same country appears at different map coordinates on each request, causing "jumping" markers on the visualization.

Proposed Fix

Use a hash of the IP or country code as a seed for deterministic jitter, so the same input always produces the same coordinates.

Ref

PR #106 re-review: #106 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: APIBackend API, sidecar, keys

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions