Alderon-Games / pot-community-servers

Bug Reporting and Wiki for Community Servers
16 stars 0 forks source link

[New Feature] Consistent identification of the source server in Webhook events. #133

Open Yldales opened 2 months ago

Yldales commented 2 months ago

Hi 👋

As a (relatively new) server owner, I have found the webhook system to be an awesome tool. However, when managing multiple servers, I have encountered a challenge in determining which server triggered a webhook event. At present, some webhooks include a ServerName field[^1], while others do not[^2]. While it is possible to infer the source server of webhooks involving a player by retrieving the most recent PlayerLogin/PlayerLogout for that player, there does not appear to be a consistent method for retrieving the source server of all webhooks. I believe it would be beneficial to have a consistent way to identify the source server for each webhook event.

I would like to suggest the addition of a unique identifier, such as the ServerId, to each webhook. This would enable server owners to distinguish with greater ease which server triggered an event, thus facilitating the management and response to such events across multiple servers.

Suggestion:

Please note that I'm still getting familiar with Path of Titans server management, so it's possible that I've overlooked an existing solution or that my request is not relevant. If you need any additional information or clarification on this suggestion, please don't hesitate to reach out to me. I'm more than happy to provide any further details or insights that might be helpful.

[^1]: PlayerReport, PlayerLogin, PlayerLogout, PlayerHack, ServerError and BadAverageTick. [^2]: PlayerLeave, PlayerKilled, PlayerQuestComplete, PlayerQuestFailed, PlayerRespawn, PlayerWaystone, PlayerChat, PlayerProfanity, PlayerDamagedPlayer, PlayerJoinedGroup, PlayerLeftGroup, PlayerPurchase, ServerRestart, ServerRestartCountdown, ServerModerate, AdminSpectate and AdminCommand.

Yldales commented 1 month ago

I've just noticed the presence of the following HTTPS headers in requests made by a Path of Titans server, which solves the initial problem of being able to identify which server a webhook comes from :