mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-08-14 07:00:28 +02:00
Add consistent User-Agent header to all HTTP clients
Create UserAgentClient (http.BaseClient wrapper) that injects a User-Agent header into every request, reading app name and version from VersionService and contact/homepage from dev_config.dart. Format follows OSM tile usage policy: DeFlock/<version> (+https://deflock.org; contact: admin@stopflock.com) Replaces 4 inconsistent hardcoded UA strings and adds UA to the 9 call sites that previously sent none. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
fe20356734
commit
0137fd66aa
@@ -52,6 +52,8 @@ double topPositionWithSafeArea(double baseTop, EdgeInsets safeArea) {
|
||||
// Client name for OSM uploads ("created_by" tag)
|
||||
const String kClientName = 'DeFlock';
|
||||
// Note: Version is now dynamically retrieved from VersionService
|
||||
const String kContactEmail = 'admin@stopflock.com';
|
||||
const String kHomepageUrl = 'https://deflock.org';
|
||||
|
||||
// Upload and changeset configuration
|
||||
const Duration kUploadHttpTimeout = Duration(seconds: 30); // HTTP request timeout for uploads
|
||||
|
||||
Reference in New Issue
Block a user