{"record":{"id":"96147067fadef726","repo":"balderdashy/sails","slug":"e-invalid-ssl-config","errorCode":"E_INVALID_SSL_CONFIG","errorMessage":"Invalid SSL configuration in `sails.config.ssl`!  Must include `cert` and `key` properties!","messagePattern":"Invalid SSL configuration in `sails\\.config\\.ssl`!  Must include `cert` and `key` properties!","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/hooks/http/index.js","lineNumber":102,"sourceCode":"        customMiddleware: undefined,\n\n        // Should be left false unless behind a proxy.\n        // (this is passed in to Express as the \"trust proxy\" setting)\n        trustProxy: false,\n\n      }//< .http>\n\n    },//< / defaults >\n\n\n\n    configure: function() {\n\n      // If one piece of the ssl config is specified, ensure the other required piece is there\n      if (sails.config.ssl && (\n        sails.config.ssl.cert && !sails.config.ssl.key\n      ) || (!sails.config.ssl.cert && sails.config.ssl.key)) {\n        throw flaverr({ name: 'userError', code: 'E_INVALID_SSL_CONFIG' }, new Error('Invalid SSL configuration in `sails.config.ssl`!  Must include `cert` and `key` properties!'));\n      }\n\n      // Deprecate `customMiddlware` option.\n      if (sails.config.http.customMiddleware) {\n        sails.log.debug('Warning: use of `customMiddleware` is deprecated in Sails 1.0.');\n        sails.log.debug('Instead, use an Express 4-compatible middleware (res, res, next) function.');\n        sails.log.debug('See http://sailsjs.com/docs/upgrading/to-v-1-0#?express-4 for more info.');\n        sails.log.debug();\n      }\n\n      // Path static files will be served from\n      //\n      // Uses `path.resolve()` to accept either:\n      //  • an absolute path\n      //  • a relative path from the app root (sails.config.appPath)\n      sails.config.paths.public = path.resolve(sails.config.appPath, sails.config.paths.public);\n\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/hooks/http/index.js#L84-L120","documentation":"Error \"Invalid SSL configuration in `sails.config.ssl`!  Must include `cert` and `key` properties!\" thrown in balderdashy/sails.","triggerScenarios":"Thrown at lib/hooks/http/index.js:102 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}