electron-release-server icon indicating copy to clipboard operation
electron-release-server copied to clipboard

No `sails.config.sockets.onlyAllowOrigins` or `sails.config.sockets.beforeConnect` setting was detected. For security reasons, one of these options must be set when running Sails in a production environment.

Open RutsuKun opened this issue 2 years ago • 1 comments

image Docker Prod

RutsuKun avatar Jan 23 '23 13:01 RutsuKun

Modify config/docker.js

  ...
  // Optional if behind a load balancer or proxy
  http: {
    trustProxy: true
  },
  // Replace "https://your.url.com" with your update server URL
  sockets: {
    onlyAllowOrigins: ["https://your.url.com"]
  },
  ...
  // Optional if https is used
  session: {
    cookie: {
       secure: true
    },
  ...

and also change migrate: 'alter' to migrate: 'safe'

kolucciy avatar Jan 24 '23 12:01 kolucciy