balderdashy/sails · error

E_INVALID_SSL_CONFIG

E_INVALID_SSL_CONFIG

Error message

Invalid SSL configuration in `sails.config.ssl`!  Must include `cert` and `key` properties!

What it means

Error "Invalid SSL configuration in `sails.config.ssl`! Must include `cert` and `key` properties!" thrown in balderdashy/sails.

Source

Thrown at lib/hooks/http/index.js:102

        customMiddleware: undefined,

        // Should be left false unless behind a proxy.
        // (this is passed in to Express as the "trust proxy" setting)
        trustProxy: false,

      }//< .http>

    },//< / defaults >



    configure: function() {

      // If one piece of the ssl config is specified, ensure the other required piece is there
      if (sails.config.ssl && (
        sails.config.ssl.cert && !sails.config.ssl.key
      ) || (!sails.config.ssl.cert && sails.config.ssl.key)) {
        throw flaverr({ name: 'userError', code: 'E_INVALID_SSL_CONFIG' }, new Error('Invalid SSL configuration in `sails.config.ssl`!  Must include `cert` and `key` properties!'));
      }

      // Deprecate `customMiddlware` option.
      if (sails.config.http.customMiddleware) {
        sails.log.debug('Warning: use of `customMiddleware` is deprecated in Sails 1.0.');
        sails.log.debug('Instead, use an Express 4-compatible middleware (res, res, next) function.');
        sails.log.debug('See http://sailsjs.com/docs/upgrading/to-v-1-0#?express-4 for more info.');
        sails.log.debug();
      }

      // Path static files will be served from
      //
      // Uses `path.resolve()` to accept either:
      //  • an absolute path
      //  • a relative path from the app root (sails.config.appPath)
      sails.config.paths.public = path.resolve(sails.config.appPath, sails.config.paths.public);

View on GitHub (pinned to 7b76422cc2)

When it happens

Trigger: Thrown at lib/hooks/http/index.js:102 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of balderdashy/sails@7b76422cc2 (2026-09-01). Data as JSON: /api/errors/96147067fadef726. Report an issue: GitHub.