fix: improve plugins functionality with server management
This commit is contained in:
@@ -59,6 +59,17 @@ export function getDocsHtml(specUrl: string): string {
|
||||
disabled: true
|
||||
}
|
||||
};
|
||||
const contentSecurityPolicy = [
|
||||
"default-src 'none'",
|
||||
"script-src 'self' 'nonce-metoyou-local-api-docs'",
|
||||
"style-src 'self' 'unsafe-inline'",
|
||||
"img-src 'self' data: blob:",
|
||||
"font-src 'self' data:",
|
||||
"connect-src 'self'",
|
||||
"base-uri 'none'",
|
||||
"form-action 'none'",
|
||||
"frame-ancestors 'none'"
|
||||
].join('; ');
|
||||
|
||||
return `<!doctype html>
|
||||
<html lang="en">
|
||||
@@ -67,7 +78,7 @@ export function getDocsHtml(specUrl: string): string {
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta
|
||||
http-equiv="Content-Security-Policy"
|
||||
content="default-src 'none'; script-src 'self' 'nonce-metoyou-local-api-docs'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'"
|
||||
content="${contentSecurityPolicy}"
|
||||
/>
|
||||
<title>MetoYou Local API</title>
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user