Overwolf.web.webserver allow CORS

  • Feature Description: We would like to do a request to our app to know if it’s running or not. However, overwolf webserver doesn’t allow CORS, thus our request is blocked by the user browser…
  • impact for my app: we worked around it with a custom C# plugin.
  • What is your current pain point? No way for us to know that our app is running to display meaningful information on our website :confused:
  • What do you have in mind to solve it? Add CORS header to webserver response

note for stuff: after FR is accepted, add a link to the internal ticket.

Hey @Sorikairox,

Do you know about the externally_connectable setting in the manifest? I recently had a similar issue where I wanted my app to talk to an external API that didn’t expose the access-control-allow-origin header.

Anyway, check out:

1 Like

Why not have your app contact your website server whenever it is launched and closed?
Seems like that’s the much more logical way round.
Also, like @artdevgame said, you’ll need to set externally_connectable correctly.

1 Like

@artdevgame thanks for your answer. Our app is working well with our API. That’s not the issue there as the communication is between the web browser and our OW app directly (using localhost).

@Bl0n our use-case here is to detect that it’s running on the computer you’re currently using to navigate through our website, not if it is running on a “random” computer (in case you have many).

Anyway, we fixed that by developing a custom C# plugin for our app that instantiate a webserver that send corrects CORS headers, because that is the issue here, built-in OW webserver doesn’t send the access-control-allow-origin header

Would be good to have it built-in. I’m editing my FR as it’s not a show-stopper anymore.

@Sorikairox @Bl0n I will create a feature request for that, in order to add it to our web API.
I will keep you updated here.

BTW - I guess that some other devs from the community will be happy to get the plugin that you developed as a temp workaround for this issue. If you are interested, you can publish it here: https://overwolf.github.io/docs/topics/snippets



1 Like

@Sorikairox @Bl0n following the slack conversation, i’m adding a reference to am existing plugin that implemented the solution:

@Sorikairox @Bl0n Since version 0.155, we enabled CORS supports in the OW webserver.
You can find this version on the developer’s channel.