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

move getCount API request from the client to the server #189

Closed
kantorkel opened this issue Sep 29, 2020 · 2 comments
Closed

move getCount API request from the client to the server #189

kantorkel opened this issue Sep 29, 2020 · 2 comments
Labels

Comments

@kantorkel
Copy link

At the moment, when a client opens a campaign site, the number of signatures is requested from the API. This leaks the IP addresses of all visitors to the API provider. It would be nice if, instead, the server-side of the front-end would make this request.

(Sorry if ended up posting this in the wrong repo)

@tttp
Copy link
Member

tttp commented Sep 29, 2020

just to be clear: the API provider is the same as the provider for the API collecting signatures (ie us).

This being said, I agree it's a difference to know the IP address only of the ones that agree (that submit) vs. every visitor

it's possible/trivial to fetch that counter from your website. The easiest is probably to have a cronjob that query the counter every few min and store it
(same url we use from the widget) https://api.proca.app/api?query=query%20getCount ...

As the widget is potentially embedded in a lot of different CMSes, I can't think of a way to provide a universal solution without some extra work on your side.

What about:

  • you add a cronjob (running evry x minutes) that curl the counter api and saves the json in a place your web server can serve
  • we add a param "counter_api" that would use the url of the json file on your web server

Would it work for you?

@tttp tttp added the Privacy label Sep 29, 2020
@kantorkel
Copy link
Author

it's a difference to know the IP address only of the ones that agree (that submit) vs. every visitor

👍 this is what I wanted to target

What about:

* you add a cronjob (running very x minutes) that curl the counter api and saves the json in a place your web server can serve

* we add a param "counter_api" that would use the url of the json file on your web server

Sounds like a good and reasonable solution to me. However, I can not speak for an organization ...

@tttp tttp closed this as completed Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants