redirection-host.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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_http_code: 0,
  11. forward_scheme: null,
  12. forward_domain_name: '',
  13. preserve_path: true,
  14. certificate_id: 0,
  15. ssl_forced: false,
  16. hsts_enabled: false,
  17. hsts_subdomains: false,
  18. block_exploits: false,
  19. http2_support: false,
  20. advanced_config: '',
  21. enabled: true,
  22. meta: {},
  23. // The following are expansions:
  24. owner: null,
  25. certificate: null
  26. };
  27. }
  28. });
  29. module.exports = {
  30. Model: model,
  31. Collection: Backbone.Collection.extend({
  32. model: model
  33. })
  34. };