proxy-host.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. const Backbone = require('backbone');
  2. const model = Backbone.Model.extend({
  3. idAttribute: 'id',
  4. defaults: function () {
  5. return {
  6. id: undefined,
  7. created_on: null,
  8. modified_on: null,
  9. domain_names: [],
  10. forward_scheme: 'http',
  11. forward_host: null,
  12. forward_port: null,
  13. root_dir: null,
  14. static: false,
  15. index_file: 'index.html',
  16. access_list_id: 0,
  17. certificate_id: 0,
  18. ssl_forced: false,
  19. hsts_enabled: false,
  20. hsts_subdomains: false,
  21. caching_enabled: false,
  22. allow_websocket_upgrade: false,
  23. block_exploits: false,
  24. http2_support: false,
  25. advanced_config: '',
  26. enabled: true,
  27. meta: {},
  28. // The following are expansions:
  29. owner: null,
  30. access_list: null,
  31. certificate: null
  32. };
  33. }
  34. });
  35. module.exports = {
  36. Model: model,
  37. Collection: Backbone.Collection.extend({
  38. model: model
  39. })
  40. };