mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
chore: ⚰️ Remove dead code and unused imports
This commit is contained in:
parent
3a37790315
commit
f87bcbd0da
37 changed files with 37 additions and 86 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { consoleLogger } from "@/loggers";
|
||||
import { errorResponse } from "@/response";
|
||||
import chalk from "chalk";
|
||||
import { config } from "config-manager";
|
||||
|
|
|
|||
|
|
@ -27,19 +27,6 @@ export const response = (
|
|||
});
|
||||
};
|
||||
|
||||
export const clientResponse = (
|
||||
data: BodyInit | null = null,
|
||||
status = 200,
|
||||
headers: Record<string, string> = {},
|
||||
) => {
|
||||
return response(data, status, {
|
||||
"Content-Security-Policy":
|
||||
"default-src 'none'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src *; font-src 'self'; connect-src 'self'; media-src *; object-src 'none'; prefetch-src 'none'; child-src 'none'; frame-src 'none'; worker-src 'self'; frame-ancestors 'none'; form-action 'self'; upgrade-insecure-requests; block-all-mixed-content; base-uri 'self'; manifest-src 'self'",
|
||||
"Access-Control-Allow-Origin": "null",
|
||||
...headers,
|
||||
});
|
||||
};
|
||||
|
||||
export const jsonResponse = (
|
||||
data: object,
|
||||
status = 200,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue