NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 5 6 7 8 9 … 93 Next »
webapi and silly cross site scripting stuff

 
  • 0 Vote(s) - 0 Average
webapi and silly cross site scripting stuff
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#1
2014-01-01, 04:02 AM
hi sub,

could you please add the header

Response.AppendHeader("Access-Control-Allow-Origin", "*");

to all responses for the web api? im trying to get chrome talking to the server, but since its running on a different domain (localhost vs my nextpvr), its blocked because that header isnt present.

also any chance you could send me a dll with the change?

thanks,

ps happy new year Smile
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#2
2014-01-01, 05:23 AM
The attached adds that header, but make sure you backup your original file first - I've started to make changes for the next release, and it may not be compatible with the rest of the build. You might be lucky with this specific file though.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#3
2014-01-01, 08:38 AM
quick test and that appears to have fixed it, even if i come across some issues with it because of other changes, i can confirm the header fix does fix the silly xss issue (that thing always annoys me).

thanks sub Smile
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#4
2014-01-19, 08:18 AM
hi sub can you also do the same to all webapi calls?

I'm getting the same error on the service?method=session.initiate function when running on google tv.

and can you please provide me a build with the change?

thanks
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#5
2014-01-19, 05:40 PM
reven Wrote:hi sub can you also do the same to all webapi calls?
It should already be the same on all of the service?method=... web api calls.

Quote:I'm getting the same error on the service?method=session.initiate function when running on google tv.
I just checked this specific call, and it is definitely returning that header.

Are you sure you're not seeing it?
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#6
2014-01-19, 07:18 PM
you're right, it is returning that header... for some reason google tv is complaining about it still... thanks ill check it out.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#7
2014-01-20, 03:06 AM
got it to work, had to set a flag on the webview to allow this header, very odd. thanks sub.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Webapi greg in kansas 6 1,945 2020-07-26, 06:15 PM
Last Post: mvallevand
  Tuner plugin - cross link mvallevand 17 5,252 2011-09-10, 05:23 AM
Last Post: mvallevand
  Windows Media Connect - Storing stuff on a Home Server psycik 3 2,644 2009-09-29, 03:47 AM
Last Post: mvallevand
  Web site programming - precompiled, compile on demand.... psycik 9 2,789 2008-02-27, 10:23 PM
Last Post: psycik
  Probably silly skining problem... ACTCMS 4 2,029 2007-09-27, 08:06 PM
Last Post: ACTCMS
  MultiThreaded stuff. psycik 4 1,885 2007-06-23, 06:47 AM
Last Post: psycik
  sub i have a silly question reven 1 1,776 2004-11-22, 03:41 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode