Nosecone: Next.js, SvelteKit, Node.js, Bun ? Deno?? ?? ??? ???? ?? ?????
Dec 17, 2024 pm 10:44 PMCSP(??? ?? ??) ? HSTS(HTTP Strict Transport Security)? ?? ?? ?? ??? ???? ????? ??? ?? ?? ?????? Nosecone? ???? ?? ??? ?????. Bun, Deno ?? Node.js? ???? Next.js, SvelteKit ? ?? JavaScript ?????.
???? ??? ???? ??? ? ??? ??? ??, ??? ???? ?? ???? ?? ?? nonce? ????? ??? ?? ??? ??? ??? ??? ??? ?? ???? ????.
2025?? ???? PCI DSS 4.0? ?? ??? ?? ?? ?? ??? ???? ??? ??? ?? ??? ????? ?? Nosecone? ??? ?????.
- ???? ???? ?? ??? ??? API.
- Next.js? ???? ???
- SvelteKit? ?? ??
- Bun, Deno ? Node.js? ? ??? ?? ?????.
Nosecone? ??? ?????? ????? Arcjet ??? ?? ?? SDK? ???? ??, ?, ??? ?? ? ??? ?? ??? ? ????.
?? ?? ???? ?? GitHub?? ?? ??? ?????.
?? ??
Nosecone? ?? JS API, Next.js? ???? ???, SvelteKit? ?? ??? ???? ???? ???? ?????. ???? ????? ??? ??? ?? ??? ? ????.
Nosecone? ?? ???? ?? ?? ??? ?????.
- ??? ?? ??(CSP)
- COEP(?? ?? ?? ??)
- ?? ??-??? ??
- ?? ??-??? ??
- ??-????-????
- ??? ??
- ??? ?? ??(HSTS)
- X-??? ?? ??
- X-DNS-???? ??
- X-???? ??
- X-??? ??
- X-Permitted-?? ??? ??
- X-XSS ??
???? ??? ????.
HTTP/1.1 200 OK content-security-policy: base-uri 'none'; child-src 'none'; connect-src 'self'; default-src 'self'; font-src 'self'; form-action 'self'; frame-ancestors 'none'; frame-src 'none'; img-src 'self' blob: data:; manifest-src 'self'; media-src 'self'; object-src 'none'; script-src 'self'; style-src 'self'; worker-src 'self'; upgrade-insecure-requests; cross-origin-embedder-policy: require-corp cross-origin-opener-policy: same-origin cross-origin-resource-policy: same-origin origin-agent-cluster: ?1 referrer-policy: no-referrer strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-dns-prefetch-control: off x-download-options: noopen x-frame-options: SAMEORIGIN x-permitted-cross-domain-policies: none x-xss-protection: 0 Content-Type: text/plain Date: Wed, 27 Nov 2024 21:05:50 GMT Connection: keep-alive Keep-Alive: timeout=5 Transfer-Encoding: chunked
Next.js ?? ?? ??
Nosecone? ?? ??? ??? ? ?? Next.js ???? ???? ?????.
npm i @nosecone/next? ??? ? ? middleware.ts ??? ?????. ??? ??? ??? ?????.
import { createMiddleware } from "@nosecone/next"; // Remove your middleware matcher so Nosecone runs on every route. export default createMiddleware();
SvelteKit ?? ?? ??
Nosecone? SvelteKit?? ?? ?? ??? ???? ?? CSP ??? ??? ?????.
npm i @nosecone/sveltekit?? ??? ?? svelte.config.js ??? ?????. ??? ??? ??? ?????.
import adapter from "@sveltejs/adapter-auto"; import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; import { csp } from "@nosecone/sveltekit" /** @type {import('@sveltejs/kit').Config} */ const config = { preprocess: vitePreprocess(), kit: { // Apply CSP with Nosecone defaults csp: csp(), adapter: adapter(), }, }; export default config;
SvelteKit ??? CSP? ???? ??? src/hooks.server.ts?? ?? ?? ??? ??? ??? ? ????
HTTP/1.1 200 OK content-security-policy: base-uri 'none'; child-src 'none'; connect-src 'self'; default-src 'self'; font-src 'self'; form-action 'self'; frame-ancestors 'none'; frame-src 'none'; img-src 'self' blob: data:; manifest-src 'self'; media-src 'self'; object-src 'none'; script-src 'self'; style-src 'self'; worker-src 'self'; upgrade-insecure-requests; cross-origin-embedder-policy: require-corp cross-origin-opener-policy: same-origin cross-origin-resource-policy: same-origin origin-agent-cluster: ?1 referrer-policy: no-referrer strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff x-dns-prefetch-control: off x-download-options: noopen x-frame-options: SAMEORIGIN x-permitted-cross-domain-policies: none x-xss-protection: 0 Content-Type: text/plain Date: Wed, 27 Nov 2024 21:05:50 GMT Connection: keep-alive Keep-Alive: timeout=5 Transfer-Encoding: chunked
Bun ?? ?? ??
Nosecone? Bun ? ??? ???? ?? ?? ??? ?? ??? ? ????.
bun add nosecone? ???? ??? ?? ?? ??? ?????. ??? ??? ??? ?????.
import { createMiddleware } from "@nosecone/next"; // Remove your middleware matcher so Nosecone runs on every route. export default createMiddleware();
Deno ?? ?? ??
Nosecone? Deno ??? ?? ???? ?? ??? ?????. deno add npm:nosecone? ??? ?? ?? ??? ?????. ??? ??? ??? ?????.
import adapter from "@sveltejs/adapter-auto"; import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; import { csp } from "@nosecone/sveltekit" /** @type {import('@sveltejs/kit').Config} */ const config = { preprocess: vitePreprocess(), kit: { // Apply CSP with Nosecone defaults csp: csp(), adapter: adapter(), }, }; export default config;
Node.js ?? ?? ??
Nosecone? Node.js ???????? ??? ? ??? Express.js? ???? ????? Remix? ?? ???? ?? Nosecone ??? ?? ??? ???? Helmet? ???? ?? ????.
npm i nosecone?? ??? ?? Node.js ??? ?????. ??? ??? ??? ?????.
import { createHook } from "@nosecone/sveltekit"; import { sequence } from "@sveltejs/kit/hooks"; export const handle = sequence(createHook());
??
Nosecone? ?? ????? ???? ?? ??? ??? ???? ??? ??? ???. ??? ????? Discord??? ???? ? ????!
? ??? Nosecone: Next.js, SvelteKit, Node.js, Bun ? Deno?? ?? ??? ???? ?? ?????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

TAGGSATTHEBOTTOMOFABLOGPOSTORWEBPAGESERVESPRACTICALPURSEO, USEREXPERIENCE, andDESIGN.1.ITHELPSWITHEOBYOWNSESPORENGENSTOESTOCESKESKERKESKERKERKERDER-RELEVANTTAGSWITHOUTHINGTEMAINCONTENT.2.ITIMPROVESEREXPERKEEPINGTOPONTEFOCUSOFOFOFOCUSOFOFOFOCUCUSONTHEATECLL

??? ?? ? ??? DOM?? ??? ??? ? ?????. ??? ?? ????? ?? ??????, ??? ?? ???? ?? ????????. 1. ??? ??? addeventListener? usecapture ?? ??? true? ???? ?????. 2. ??? ??? ?? ???? usecapture? ???? ????? ?????. 3. ??? ??? ??? ??? ???? ? ??? ? ????. 4. ??? ?? ?? ?? ??? ?? ??? ??????? ??? ???? ?????. 5. ??? ?? ?? ?? ??? ?? ???? ?? ???? ? ??? ? ????. ? ? ??? ???? ???? JavaScript? ??? ??? ??? ????? ???? ???? ??? ??????.

ES ??? CommonJS? ?? ???? ?? ?? ? ?? ???????. 1. Commonjs? ????????? Node.js ?? ? ??? ?????. 2.ES ??? ???????? ????? ?? ???? ??? ?????. 3. ??, ES ??? ?? ??/????? ???? ??? ??? ?????? CommonJS? Quiew/Module.exports? ???? ???? ???? ?? ? ? ????. 4. Commonjs? Express? ?? ???? Node.js ? ?????? ?? ???? ?? ???? ?? ES ??? ?? ??? ?? ??? ?? ? Node.jsv14? ?????. 5. ?? ? ? ??? ?? ??? ??? ? ????.

JavaScript? ??? ?? ????? ??? ?? ??? ??? ?? ?? ?? ????? ?? ???? ???? ?????. ??? ?? ???? ?? ??? ?? ??? ???? ???? ?? ?? ???? ???? ?????. ?? ??, ??? ? ?? ???? ??? (? : ??? null? ??) ?? ??? ????? ??????. ??? ??? ???? ??? ??? ????. closure?? ?? ??? ?? ??; ? ??? ??? ?? ?? ???? ?? ???? ????. V8 ??? ?? ???, ?? ??, ??/?? ???? ?? ??? ?? ??? ??? ????? ?? ??? ?? ??? ????. ?? ?? ???? ??? ??? ??? ??? ???? ????? ?? ?? ???? ?? ???????.

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

VAR, Let ? Const? ???? ??, ?? ? ?? ?????. 1.var? ?? ??????? ?? ???? ?? ? ??? ?????. 2. let? ?? ?? ????? ?? ?? ???? ?? ? ??? ???? ????. 3. ???? ?? ?? ???? ?? ??????? ? ?? ? ? ??? ?? ??? ?? ?? ??? ? ????. ?? const? ???? ??? ??? ? LET? ???? VAR? ???? ????.

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

DOM Traversal? ? ??? ?? ??? ?????. ???? ???? ??? ?????. 1. ParentNode? ???? ?? ??? ?? ???? ?? ? ????. 2. ???? ?? ?? ??? ???? ??? ?? ? ?? ?? ?? ??? ??? ??????. 3. NextElementsibling? ?? ?? ??? ?? ?? ??? ???? ??? ??? ??? ?????. ???? ?? ??, ??? ?? ?? ?? ?? ?? ????? ??? ???? ?? Brother ??? ?? ?????. ??? ??? ??? ? ??? ??? ??? ???? ?? ? ? ????.
