mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-14 05:15:19 +00:00
* migrate anonymous access logic out of ee * add anonymous access toggle * handle anon toggle properly based on perms * add forceEnableAnonymousAccess setting * add docs for access settings * change forceEnableAnonymousAccess to be an env var * add FORCE_ENABLE_ANONYMOUS_ACCESS to list in docs * add back the enablePublicAccess setting as deprecated * add changelog entry * fix build errors * add news entry for anonymous access * feedback
19 lines
755 B
TypeScript
19 lines
755 B
TypeScript
import { Settings } from "./types.js";
|
|
|
|
/**
|
|
* Default settings.
|
|
*/
|
|
export const DEFAULT_SETTINGS: Settings = {
|
|
maxFileSize: 2 * 1024 * 1024, // 2MB in bytes
|
|
maxTrigramCount: 20000,
|
|
reindexIntervalMs: 1000 * 60 * 60, // 1 hour
|
|
resyncConnectionIntervalMs: 1000 * 60 * 60 * 24, // 24 hours
|
|
resyncConnectionPollingIntervalMs: 1000 * 1, // 1 second
|
|
reindexRepoPollingIntervalMs: 1000 * 1, // 1 second
|
|
maxConnectionSyncJobConcurrency: 8,
|
|
maxRepoIndexingJobConcurrency: 8,
|
|
maxRepoGarbageCollectionJobConcurrency: 8,
|
|
repoGarbageCollectionGracePeriodMs: 10 * 1000, // 10 seconds
|
|
repoIndexTimeoutMs: 1000 * 60 * 60 * 2, // 2 hours
|
|
enablePublicAccess: false // deprected, use FORCE_ENABLE_ANONYMOUS_ACCESS instead
|
|
}
|