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


Post Reply 
 
Thread Rating:
  • 0 Votes - 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.)
Post: #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.
Find all posts by this user
Quote this message in a reply
01-09-2017, 01:14 PM
Post: #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. ;-)
Visit this user's website Find all posts by this user
Quote this message in a reply
01-09-2017, 01:29 PM
Post: #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
Find all posts by this user
Quote this message in a reply
01-09-2017, 02:50 PM
Post: #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.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-09-2017, 02:55 PM
Post: #5
RE: [ADDED] Allow CORS in Client API
ooh fancy Big Grin any ETA on 2.7.2?
Find all posts by this user
Quote this message in a reply
01-09-2017, 04:24 PM
Post: #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. :-)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Added support for controller use? Divisi 3 1,152 07-06-2015 06:38 AM
Last Post: smitmartijn
  Website caveats and client nitpicking robby251 0 2,753 01-31-2014 06:19 PM
Last Post: robby251
  FreeBSD Client gadean 3 4,324 08-13-2013 06:51 PM
Last Post: gadean
  Can WhatPulse client record the log of every click of mouse & keyboard? gzc9047 1 5,212 06-08-2013 03:33 PM
Last Post: smitmartijn
  ARM client [GMOT]lucb1e 5 7,344 05-11-2013 10:30 AM
Last Post: smitmartijn
  Client Additions stan0 3 4,914 03-10-2013 10:42 PM
Last Post: WOWVern
  New Whatpulse Client Idea stuthemonkey 3 5,977 03-06-2013 06:13 AM
Last Post: Xander641
  WhatPulse Client API Marius 13 14,179 11-19-2011 10:19 AM
Last Post: gambiauser

Forum Jump:


User(s) browsing this thread: 1 Guest(s)