settings.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { env } from 'app/lib/platform/env'
  2. import { settingsLayout } from 'app/settings/layout';
  3. import { settingsForms } from 'app/settings/forms';
  4. import { settingsFeed } from 'app/settings/feed';
  5. import { settingsBrowse } from 'app/settings/browse';
  6. import { settingsSocialActions } from 'app/settings/social-actions';
  7. import { settingsMenus } from 'app/settings/menus';
  8. import { settingsHeaderToolbar } from 'app/settings/header-toolbar';
  9. import { settingsWiki } from 'app/settings/wiki';
  10. import { settingsTheme } from 'app/settings/theme';
  11. import { settingsElements } from 'app/settings/elements';
  12. import { settingsConfigs } from 'app/settings/configs';
  13. import { ImageAllowlistHostnames } from 'app/settings/images-allowlist';
  14. export const settingsDefault = {
  15. config: {
  16. una_url: env('UNA_URL'),
  17. app_url: env('APP_URL'),
  18. una_api_key: env('UNA_API_KEY'),
  19. // CI previews: pr-<n>.<domain> is served by the backend at api-pr-<n>.<domain>,
  20. // authenticated with preview_api_key (server only). Unset = no preview hosts.
  21. preview_domain: env('UNA_PREVIEW_DOMAIN'),
  22. preview_api_key: env('UNA_PREVIEW_API_KEY'),
  23. app_origin: env('APP_ORIGIN'),
  24. native_app_images_url:'https://neo.so',
  25. noprefetch: false,
  26. // Gates `_log`. Always off in production; forks can set false in customization.
  27. debug: true,
  28. use_proxy_web: true,
  29. use_proxy_native: false,
  30. // Per-attempt API timeout. UNA list endpoints (the feed with preloaded comments) can
  31. // legitimately take several seconds; a timed-out GET is not retried (see fetcher.ts).
  32. fetch_timeout_ms: 30000,
  33. // Uploads (especially video) need a longer window than regular API calls.
  34. upload_timeout_ms: 300000,
  35. // Web: files over this size (MB) go straight to UNA with a one-time token instead of
  36. // through the Next proxy (Vercel caps request bodies at 4.5MB). 0 = always direct.
  37. direct_upload_over_mb: 4,
  38. sockets: {
  39. host: 'ci.una.io',
  40. port: '443',
  41. key: 'app-key',
  42. },
  43. api_keys: {
  44. google_maps: env('GOOGLE_MAPS_API_KEY'),
  45. onesignal: env('ONE_SIGNAL_API_KEY'),
  46. mapbox: env('RNMAPBOX_MAPS_DOWNLOAD_TOKEN'),
  47. },
  48. show_ui: true,
  49. app_version: '15.0.0',
  50. min_server_version: '15.0.0',
  51. stable_server_version: '15.x.x',
  52. multitenant: false,
  53. title: 'NEO',
  54. multitenant_images_proxy: null,// 'http://localhost:3000', // or null to disable
  55. use_customizations: true,
  56. image_allowlist_hostnames: ImageAllowlistHostnames,
  57. },
  58. ...settingsLayout,
  59. ...settingsForms,
  60. ...settingsFeed,
  61. ...settingsBrowse,
  62. ...settingsSocialActions,
  63. ...settingsMenus,
  64. ...settingsHeaderToolbar,
  65. ...settingsWiki,
  66. ...settingsTheme,
  67. ...settingsElements,
  68. ...settingsConfigs,
  69. }