title: Disable/Deny all protocols except ws:// in Node Media Server (Nodejs)
body: <p>I would like to deny access to anyone trying to read my stream from http or rtmp protocols. </p>
  
  <p>I am learning on the fly, so I'm no dev, kinda rookie actually.. so if you could explain to me how to do this in simple terms.. I'd really much appreciate it !</p>
  
  <p>Here the code I'm using right now and that allows every protocols to be played... </p>
  
  <pre><code>const { NodeMediaServer } = require('node-media-server');
  
  const config = {
  logType: 3,
  
  rtmp: {
  port: 1935,
  chunk_size: 60000,
  gop_cache: true,
  ping: 60,
  ping_timeout: 30
  },
  http: {
  port: 8080,
  allow_origin: '*',
  },
  };
  
  var nms = new NodeMediaServer(config)
  nms.run();
  </code></pre>
  
  <p>The best would be an if statement, but I've been searching/testing but I didn't succeed.</p>
  
  <p>Thank you for your help and time !</p>