Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 01-16-2019, 05:42 AM   #1
Azzar
Human being with feelings
 
Azzar's Avatar
 
Join Date: Aug 2011
Location: Copenhagen, Denmark
Posts: 37
Default Reaper devs: Can the webserver be made to allow cross origin access on localhost?

I'm playing around with the newly released Stream Deck SDK, and am trying to make a Stream Deck plugin that allows sending and receiving actions and data via the web browser interface.

This works ok for sending actions from the Stream Deck, but for receiving data - in this case a GET/EXTSTATE/key/value request - I run into problems because of the servers cross-origin policy. I get this error:
"No 'Access-Control-Allow-Origin' header is present on the requested resource"

The problem is basically that the Stream Deck runs the plugin on it's own webserver - that is also on localhost, but on a different port.

Can anything be done to allow these kind of requests? Just allowing XMLHttRequests from all ports on localhost would be great and, I think, not much of a security issue?
Azzar is offline   Reply With Quote
Old 01-16-2019, 08:38 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Opening something on all ports is always a security issue.

But if I could choose, which ports shall be used by a webserver-instance to limit that, maximize it would be a cool idea.

BTW: this is a Feature-Request, so should be added into the appropriate sub-forum.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 01-16-2019, 09:25 AM   #3
Azzar
Human being with feelings
 
Azzar's Avatar
 
Join Date: Aug 2011
Location: Copenhagen, Denmark
Posts: 37
Default

Yeah, I was unsure of where to put this. Should I make a new thread in the feature request forum or is there a way of getting the thread moved? Sorry for being a n00b here

I agree that a configurable port(range) would probably be the best way to solve it.
And it would be super cool to be able to build a remote that works on a Stream Deck.
Azzar is offline   Reply With Quote
Old 01-18-2019, 09:57 AM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Yes, it's probably the best to open another one, as not everyone interested in this feature might be an active developer browsing this subforum, but rather the Feature-Request forum, adding their own 2cents to your idea.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.