diff options
author | Thesourtimes <cckhmck@gmail.com> | 2021-12-18 15:19:07 +0300 |
---|---|---|
committer | Thesourtimes <cckhmck@gmail.com> | 2021-12-18 15:19:07 +0300 |
commit | 13eb680272a400acf67c71610262155ae2af8546 (patch) | |
tree | 40f347f74276809b7b29bf33d8cebe8b64af43f4 | |
parent | Add the new discovery route (diff) | |
download | server-13eb680272a400acf67c71610262155ae2af8546.tar.xz |
Improvements + dummy API configs
-rw-r--r-- | .github/ISSUE_TEMPLATE/config.yml | 5 | ||||
-rw-r--r-- | nginx.conf | 20 | ||||
-rw-r--r-- | util/src/entities/Config.ts | 17 |
3 files changed, 41 insertions, 1 deletions
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3cb5dbc5..cdbe0e2e 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,11 @@ blank_issues_enabled: false contact_links: - - name: Developer Documentation + - name: Fosscord Documentation url: https://docs.fosscord.com/ about: Need documentation and examples for the Fosscord? Head over to Fosscord's official documentation. + - name: Discord's Developer Documentation + url: https://discord.com/developers/docs/intro + about: Need help with the Discord resources? Head here instead of asking on Fosscord! - name: Fosscord' Official Discord server url: https://discord.com/invite/Ms5Ev7S6bF about: Need help with the server? Talk with us in our official server. \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 00000000..a810567d --- /dev/null +++ b/nginx.conf @@ -0,0 +1,20 @@ +# This is an example +server { + server_name fosscord.example.com; + listen 80; + location / { + proxy_pass http://127.0.0.1:3001; + proxy_set_header Host $host; + proxy_pass_request_headers on; + add_header Last-Modified $date_gmt; + add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Host $remote_addr; + proxy_no_cache 1; + proxy_cache_bypass 1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } +} \ No newline at end of file diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts index 079aa8bb..99e3537c 100644 --- a/util/src/entities/Config.ts +++ b/util/src/entities/Config.ts @@ -2,6 +2,7 @@ import { Column, Entity } from "typeorm"; import { BaseClassWithoutId, PrimaryIdColumn } from "./BaseClass"; import crypto from "crypto"; import { Snowflake } from "../util/Snowflake"; +import { SessionsReplace } from ".."; @Entity("config") export class ConfigEntity extends BaseClassWithoutId { @@ -48,6 +49,11 @@ export interface ConfigValue { endpointPublic: string | null; endpointPrivate: string | null; }; + api: { + defaultVersion: string; + activeVersions: string[]; + useFosscordEnhancements: boolean; + }; general: { instanceName: string; instanceDescription: string | null; @@ -175,6 +181,9 @@ export interface ConfigValue { }, client: { useTestClient: Boolean; + }, + metrics: { + timeout: number; } } @@ -189,6 +198,11 @@ export const DefaultConfigOptions: ConfigValue = { endpointPrivate: null, endpointPublic: null, }, + api: { + defaultVersion: "9", + activeVersions: ["6", "7", "8", "9"], + useFosscordEnhancements: true, + }, general: { instanceName: "Fosscord Instance", instanceDescription: "This is a Fosscord instance made in pre-relase days", @@ -352,5 +366,8 @@ export const DefaultConfigOptions: ConfigValue = { }, client: { useTestClient: true + }, + metrics: { + timeout: 30000 } }; |