Repository navigation
Replies: 2 comments
|
We set it for replication init but don't call osmium.replication.ReplicationServer.set_request_parameter to set any headers. We probably should set it to indicate osm2pgsql-replication is the user. I don't see a great need for a custom UA since an unmodified osm2pgsql-replication won't abuse the replication server and if there were a bug it wouldn't be instance-specific |
0 replies
|
Hi Thanks for all of your great works 💌 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi
With the proliferation of new code generators, community servers need to identify the sources of replication so that they can contact them in the event of abuse or other problems.
But we cannot set the "user-agent" of replication http requests. The underlying
pyosmiumdoes not give access to the user-agent, it is hard coded asheaders = {"User-Agent": f"pyosmium/{version.pyosmium_release}"}.To set the user-agent we are required to encapsulate
osm2pgsql-replicationcalls with a Python hack. Fortunately, a helpful LLM that happened to be passing by my keyboard provided me with the solution.Then the systemd service ExecStart is
ExecStart=/.../osm2pgsql-update-ua.py update -d osm ...In my view, the ‘minute-diffs’ replication stack will need to evolve to allow the user-agent to be defined.
Regards, thanks & cheers 💌
All reactions