http.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * HTTP Server Settings
  3. * (sails.config.http)
  4. *
  5. * Configuration for the underlying HTTP server in Sails.
  6. * (for additional recommended settings, see `config/env/production.js`)
  7. *
  8. * For more information on configuration, check out:
  9. * https://sailsjs.com/config/http
  10. */
  11. module.exports.http = {
  12. /****************************************************************************
  13. * *
  14. * Sails/Express middleware to run for every HTTP request. *
  15. * (Only applies to HTTP requests -- not virtual WebSocket requests.) *
  16. * *
  17. * https://sailsjs.com/documentation/concepts/middleware *
  18. * *
  19. ****************************************************************************/
  20. middleware: {
  21. /***************************************************************************
  22. * *
  23. * The order in which middleware should be run for HTTP requests. *
  24. * (This Sails app's routes are handled by the "router" middleware below.) *
  25. * *
  26. ***************************************************************************/
  27. // order: [
  28. // 'cookieParser',
  29. // 'session',
  30. // 'bodyParser',
  31. // 'compress',
  32. // 'poweredBy',
  33. // 'router',
  34. // 'www',
  35. // 'favicon',
  36. // ],
  37. /***************************************************************************
  38. * *
  39. * The body parser that will handle incoming multipart HTTP requests. *
  40. * *
  41. * https://sailsjs.com/config/http#?customizing-the-body-parser *
  42. * *
  43. ***************************************************************************/
  44. // bodyParser: (function _configureBodyParser(){
  45. // var skipper = require('skipper');
  46. // var middlewareFn = skipper({ strict: true });
  47. // return middlewareFn;
  48. // })(),
  49. },
  50. };