mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
refactor(config): ♻️ Redo config structure from scratch, simplify validation code, improve checks, add support for loading sensitive data from paths
This commit is contained in:
parent
d4afd84019
commit
54fd81f076
118 changed files with 3892 additions and 5291 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import type { ContentFormat } from "@versia/federation/types";
|
||||
import { htmlToText as htmlToTextLib } from "html-to-text";
|
||||
import { lookup } from "mime-types";
|
||||
import { config } from "~/packages/config-manager";
|
||||
import { config } from "~/config.ts";
|
||||
|
||||
export const getBestContentType = (
|
||||
content?: ContentFormat | null,
|
||||
|
|
@ -67,7 +67,7 @@ export const mimeLookup = (url: URL): Promise<string> => {
|
|||
const fetchLookup = fetch(url, {
|
||||
method: "HEAD",
|
||||
// @ts-expect-error Proxy is a Bun-specific feature
|
||||
proxy: config.http.proxy.address,
|
||||
proxy: config.http.proxy_address,
|
||||
})
|
||||
.then(
|
||||
(response) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue