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

Allow to change forward url #105

Closed
luckydonald opened this issue Jan 30, 2021 · 4 comments
Closed

Allow to change forward url #105

luckydonald opened this issue Jan 30, 2021 · 4 comments
Labels
effort:2 enhancement New feature or request prio c

Comments

@luckydonald
Copy link

luckydonald commented Jan 30, 2021

In the admin section there's an option to forward events to the original wakatime service.
One can enter a key, but not to another self hosted system.
It is missing a field to enter the URL.

@muety
Copy link
Owner

muety commented Jan 30, 2021

Didn't think about that use case, but why not. Only two concerns come to my mind at first sight:

  • UI should be designed in a way that normal users are not confused or overwhelmed. WakaTime endpoint should be set as default and the field for changing it should not be too prominent.
  • We need to think of a way to avoid loops. When Wakapi instance A forwards heartbeats to Wakapi instance B, which forwards heartbeats back to A, things are going to explode 💥

@muety muety added effort:2 enhancement New feature or request labels Jan 30, 2021
@luckydonald
Copy link
Author

luckydonald commented Jan 30, 2021

Regarding UI

https://wakatime.com/api/current/heartbeats Reset

Text box and a reset button.

I love mocking UIs in markdown

@muety
Copy link
Owner

muety commented Jan 30, 2021

I like it 😃.

Regarding loops: the forwarding middleware would probably have to be extended to check whether an incoming heartbeat is already in the database and, if yes, drop it and don't forward it. Some kind of caching could be added, as such a forwarding loop will most likely occur within very short time.

@luckydonald
Copy link
Author

I'm not sure if that kind of loop is really a problem. After all I can DDoS a server a lot simpler.
Feels like a over-engineered solution for the average self-hoster.

@muety muety added the prio c label Oct 13, 2021
@muety muety closed this as completed in 7159df3 Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:2 enhancement New feature or request prio c
Projects
None yet
Development

No branches or pull requests

2 participants