Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set user-agent when making requests to the OSM API #712

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

willemarcel
Copy link
Collaborator

No description provided.

@willemarcel willemarcel requested a review from jake-low August 27, 2024 13:28
@@ -375,3 +375,4 @@
)

OSMCHA_URL = env('OSMCHA_URL', default='https://osmcha.org')
OSM_API_USER_AGENT = {"User-Agent": "OSMCha osmcha-django v4"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO "v4" would ideally get read from __version__.py or similar somewhere in the repository, so we don't forget to update this string when v5 is released. But I grepped and it looks like the current version isn't actually stored anywhere in the codebase (just in the git tags) so I'm fine with hard-coding for now. I'll try to make a mental note that this is something that needs updating next time there's a major version bump. 🙂

osmchadjango/users/utils.py Show resolved Hide resolved
@willemarcel willemarcel merged commit c1ef15b into master Aug 27, 2024
2 checks passed
@willemarcel willemarcel deleted the fix/osm-user-agent branch August 27, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants