mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(api): allow Scalar docs through auth and CSP
This commit is contained in:
@@ -50,7 +50,7 @@ app.addHook("onSend", async (_request, reply) => {
|
||||
reply.header("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
|
||||
reply.header(
|
||||
"Content-Security-Policy",
|
||||
"default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' blob: data:; connect-src 'self'; font-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'",
|
||||
"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' blob: data:; connect-src 'self'; font-src 'self' data:; object-src 'none'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'",
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -585,6 +585,8 @@ const PUBLIC_PATHS = [
|
||||
"/api/v1/download/",
|
||||
"/api/v1/jobs/",
|
||||
"/api/v1/settings/logo",
|
||||
"/api/docs",
|
||||
"/api/v1/openapi.yaml",
|
||||
];
|
||||
|
||||
function isPublicRoute(url: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user