WhatPulse Forums » Feature requests » Client software v » [ADDED] Allow CORS in Client API Welcome back, Guest.


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ADDED] Allow CORS in Client API
01-06-2017, 07:36 PM, (This post was last modified: 01-09-2017, 02:51 PM by smitmartijn.)
#1
[ADDED] Allow CORS in Client API
The client API is awesome Big Grin but at the moment there is one thing preventing me from using it as I want.

I would like to do something with the API-results in OBS. What I've done is created an OBS Browser Source loading a HTML-file which shows some whatpulse-related stats. Those stats are updated by javascript calling the API endpoint. This is where things start not working: due to CORS, an http-request from a file in the filesystem is now allowed to go to another domain, localhost in this case.

So I'd like to request the addition of the "access-control-allow-origin: *" header which would solve this problem.
Reply
01-09-2017, 01:14 PM,
#2
RE: Allow CORS in Client API
Excellent idea! I'll add this into the next version.

Do you have something ready that talks to it? If so, please share - saves me some time to build a tester myself. ;-)
Reply
01-09-2017, 01:29 PM,
#3
RE: Allow CORS in Client API
awesome Big Grin
and ofc, this is what I have, have fun with it Tongue http://pastebin.com/tTkUp5Rn
Reply
01-09-2017, 02:50 PM,
#4
RE: Allow CORS in Client API
Thanks. Verified to be working: https://www.evernote.com/l/AQIs-8NlbgtLI.../image.png

By the way, client version 2.7.2 will have a /v1/realtime endpoint, where you can get the actual keys per second, instead of calculating it against the browser session.
Reply
01-09-2017, 02:55 PM,
#5
RE: [ADDED] Allow CORS in Client API
ooh fancy Big Grin any ETA on 2.7.2?
Reply
01-09-2017, 04:24 PM,
#6
RE: [ADDED] Allow CORS in Client API
The beta has been out for a while ("Enable beta versions" in the update checker settings), but I don't do ETAs for official versions. :-)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Ubuntu/Linux client robertjee 4 2,652 10-25-2020, 01:35 PM
Last Post: smitmartijn
  Upgrade windows client to Npcap Drake356 3 4,106 07-04-2020, 06:35 PM
Last Post: smitmartijn
  Running the client headless hjord 0 1,977 08-18-2019, 09:45 AM
Last Post: hjord
  Added support for controller use? Code-E 3 4,136 07-06-2015, 06:38 AM
Last Post: smitmartijn
  Website caveats and client nitpicking robby251 0 4,678 01-31-2014, 06:19 PM
Last Post: robby251
  FreeBSD Client gadean 3 7,501 08-13-2013, 06:51 PM
Last Post: gadean
  Can WhatPulse client record the log of every click of mouse & keyboard? gzc9047 1 7,712 06-08-2013, 03:33 PM
Last Post: smitmartijn
  ARM client [GMOT]lucb1e 5 12,411 05-11-2013, 10:30 AM
Last Post: smitmartijn
  Client Additions stan0 3 7,996 03-10-2013, 10:42 PM
Last Post: WOWVern
  New Whatpulse Client Idea stuthemonkey 3 8,825 03-06-2013, 06:13 AM
Last Post: Xander641

Forum Jump:


Users browsing this thread: 2 Guest(s)