Skip to content

Include appropriate user-agent header when making map requests #1292

@pnorman

Description

@pnorman

I'm one of the admins of tile.openstreetmap.org. Currently flutter_map uses the default dart:io HTTP User-Agent (e.g. Dart/2.17 (dart:io)). This means that when looking at traffic, flutter traffic gets lumped in with other Dart traffic, and if any Dart users are causing usage problems, all Dart users including flutter could end up blocked. This happened recently, and because it was a generic user-agent, I was unable to figure out who the traffic was coming from.

The tile usage policy requires a Valid HTTP User-Agent identifying application. For flutter, this could be something like flutter_map/1.2.3, where 1.2.3 is a version.

A better option for your users would be to automatically generate a user-agent from the name of their app, if possible. Frequently the name of the app is something like com.example.app, so a user-agent could be com.example.app/456 flutter_map/1.2.3. If an app-specific default is not set, then the instructions should be clear about the need to set an appropriate user-agent

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue reports broken functionality or another error

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions