actionhero / actionhero-tutorial

An example actionhero project demonstrating many common features
https://www.actionherojs.com
158 stars 48 forks source link

blockedConnectionTypes is not working #107

Closed darer closed 4 years ago

darer commented 4 years ago

I have a few actions that I want to be accessible only via the web server and not the websockets. Here's an example that I tested:

  constructor() {
    super();
    this.name = "status";
    this.description = "I will return some basic information about the API";
    this.outputExample = {
      id: "192.168.2.11",
      actionheroVersion: "9.4.1",
      uptime: 10469,
    };
    this.blockedConnectionTypes = ['webSocket'];
  }

And this action is still accessible via websocket. Am I doing something wrong or is this a bug?

evantahler commented 4 years ago

I believe that should be websocket (lowercase).

If that doesn't work, it's a bug! Please open a new issue over here https://github.com/actionhero/actionhero/issues. We also might have a bug in our documentation!

darer commented 4 years ago

Lowercase worked. Thanks a lot! There's a typo in the tutorials. I'll submit an issue for that.