@networkpro/web 1.6.3 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODE_OF_CONDUCT.md +2 -2
- package/LICENSE.md +20 -9
- package/README.md +21 -19
- package/_redirects +1 -0
- package/cspell.json +2 -0
- package/package.json +5 -6
- package/playwright.config.js +1 -0
- package/scripts/bundleCss.js +2 -2
- package/src/app.html +18 -1
- package/src/hooks.server.js +42 -45
- package/src/lib/components/FullWidthSection.svelte +19 -4
- package/src/lib/components/LegalNav.svelte +31 -29
- package/src/lib/components/PostHog.svelte +20 -8
- package/src/lib/components/layout/Footer.svelte +1 -1
- package/src/lib/components/layout/HeaderDefault.svelte +2 -2
- package/src/lib/components/layout/HeaderHome.svelte +2 -2
- package/src/lib/images.js +3 -2
- package/src/lib/img/logo-web.png +0 -0
- package/src/lib/img/logo-web.webp +0 -0
- package/src/lib/index.js +2 -1
- package/src/lib/meta.js +6 -1
- package/src/lib/pages/AboutContent.svelte +4 -5
- package/src/lib/pages/HomeContent.svelte +1 -1
- package/src/lib/pages/LicenseContent.svelte +19 -20
- package/src/lib/pages/PrivacyContent.svelte +149 -6
- package/src/lib/pages/PrivacyDashboard.svelte +240 -0
- package/src/lib/pages/TermsConditionsContent.svelte +1 -1
- package/src/lib/pages/TermsUseContent.svelte +3 -4
- package/src/lib/styles/css/default.css +32 -11
- package/src/lib/styles/css/normalize.css +2 -2
- package/src/lib/styles/css/style.css +2 -2
- package/src/lib/styles/global.min.css +2 -6
- package/src/lib/utils/privacy.js +38 -0
- package/src/lib/utils/trackingCookies.js +40 -0
- package/src/lib/utils/trackingStatus.js +46 -0
- package/src/lib/utils/utm.js +8 -1
- package/src/routes/+layout.svelte +25 -12
- package/src/routes/about/+page.svelte +1 -7
- package/src/routes/foss-spotlight/+page.svelte +1 -7
- package/src/routes/license/+page.svelte +2 -8
- package/src/routes/privacy/+page.server.js +18 -0
- package/src/routes/{privacy-policy → privacy}/+page.svelte +5 -11
- package/src/routes/{privacy-policy → privacy-dashboard}/+page.server.js +2 -2
- package/src/routes/privacy-dashboard/+page.svelte +69 -0
- package/src/routes/terms-conditions/+page.svelte +2 -8
- package/src/routes/terms-of-use/+page.svelte +2 -8
- package/src/service-worker.js +31 -6
- package/static/sitemap.xml +10 -22
- package/tests/e2e/app.spec.js +21 -63
package/CODE_OF_CONDUCT.md
CHANGED
|
@@ -155,7 +155,7 @@ For answers to common questions about this code of conduct, see the FAQ at
|
|
|
155
155
|
<div style="font-size: 12px; font-weight: bold; text-align: center;">
|
|
156
156
|
|
|
157
157
|
[Home](https://netwk.pro) | [Terms of Use](https://netwk.pro/terms-of-use)
|
|
158
|
-
[Privacy Policy](https://netwk.pro/privacy
|
|
158
|
+
[Privacy Policy](https://netwk.pro/privacy) | [Legal](https://netwk.pro/license)
|
|
159
159
|
|
|
160
160
|
</div>
|
|
161
161
|
|
|
@@ -166,7 +166,7 @@ For answers to common questions about this code of conduct, see the FAQ at
|
|
|
166
166
|
Copyright © 2025
|
|
167
167
|
**[Network Pro Strategies](https://netwk.pro/)** (Network Pro™)
|
|
168
168
|
|
|
169
|
-
Network Pro™, the shield logo, and the "Locking Down Networks™" slogan are [trademarks](https://netwk.pro/
|
|
169
|
+
Network Pro™, the shield logo, and the "Locking Down Networks™" slogan are [trademarks](https://netwk.pro/license#trademark) of Network Pro Strategies.
|
|
170
170
|
|
|
171
171
|
Licensed under **[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)** and the **[GNU GPL](https://spdx.org/licenses/GPL-3.0-or-later.html)**, as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
172
172
|
|
package/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- =====================================================================
|
|
2
2
|
LICENSE.md
|
|
3
3
|
|
|
4
4
|
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
@@ -14,7 +14,7 @@ This file is part of Network Pro.
|
|
|
14
14
|
# Legal, Copyright, and Licensing
|
|
15
15
|
|
|
16
16
|
**Network Pro Strategies**
|
|
17
|
-
**Effective Date:** May
|
|
17
|
+
**Effective Date:** May 28, 2025
|
|
18
18
|
|
|
19
19
|
**Official Version Notice**
|
|
20
20
|
This document is provided for convenience only. In the event of any discrepancy, the authoritative version is the one published at [https://netwk.pro](https://netwk.pro).
|
|
@@ -38,8 +38,9 @@ This document is provided for convenience only. In the event of any discrepancy,
|
|
|
38
38
|
9. [Third-Party Code and Licenses](#third-party)
|
|
39
39
|
10. [Prohibited Uses](#prohibited-uses)
|
|
40
40
|
11. [Modifications and Liability Disclaimer](#disclaimer)
|
|
41
|
-
12. [
|
|
41
|
+
12. [Authoritative Version Clause](#version)
|
|
42
42
|
13. [Revisions](#revisions)
|
|
43
|
+
14. [Contact](#contact)
|
|
43
44
|
|
|
44
45
|
---
|
|
45
46
|
|
|
@@ -191,12 +192,13 @@ Modifications, redistribution, or any use of the Licensed Material are performed
|
|
|
191
192
|
|
|
192
193
|
<sub>[Back to top](#top)</sub>
|
|
193
194
|
|
|
194
|
-
<a name="
|
|
195
|
+
<a name="version"></a>
|
|
195
196
|
|
|
196
|
-
## 12.
|
|
197
|
+
## 12. Authoritative Version Clause
|
|
197
198
|
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
In the event of any discrepancy between different versions, formats, or distributions of any legal document issued by the Company—including but not limited to license terms, policies, notices, or agreements—the version published on the Company's primary website at [https://netwk.pro](https://netwk.pro) shall be deemed the official and controlling version.
|
|
200
|
+
|
|
201
|
+
It is your responsibility to review the most current version of any applicable legal document before relying on its contents. Continued use of the Company's materials, services, or Licensed Material constitutes acceptance of the most current version then in effect.
|
|
200
202
|
|
|
201
203
|
<sub>[Back to top](#top)</sub>
|
|
202
204
|
|
|
@@ -208,14 +210,21 @@ This legal page may be updated to comply with legal or operational changes. The
|
|
|
208
210
|
|
|
209
211
|
<sub>[Back to top](#top)</sub>
|
|
210
212
|
|
|
211
|
-
<a name="
|
|
213
|
+
<a name="contact"></a>
|
|
214
|
+
|
|
215
|
+
## 14. Contact
|
|
216
|
+
|
|
217
|
+
The Company may be contacted via our [contact form](https://netwk.pro/contact) or by email at:
|
|
218
|
+
📧 `contact (at) s.neteng.pro`
|
|
219
|
+
|
|
220
|
+
<sub>[Back to top](#top)</sub>
|
|
212
221
|
|
|
213
222
|
---
|
|
214
223
|
|
|
215
224
|
<div style="font-size: 12px; font-weight: bold; text-align: center;">
|
|
216
225
|
|
|
217
226
|
[Home](https://netwk.pro) | [Terms of Use](https://netwk.pro/terms-of-use)
|
|
218
|
-
[Privacy Policy](https://netwk.pro/privacy
|
|
227
|
+
[Privacy Policy](https://netwk.pro/privacy) | Legal
|
|
219
228
|
|
|
220
229
|
</div>
|
|
221
230
|
|
|
@@ -231,3 +240,5 @@ Network Pro™, the shield logo, and the "Locking Down Networks™" slog
|
|
|
231
240
|
Licensed under **[CC BY 4.0](#cc-by)** and the **[GNU GPL](#gnu-gpl)**, as published by the [Free Software Foundation](https://www.fsf.org), either version 3 of the License, or (at your option) any later version.
|
|
232
241
|
|
|
233
242
|
</div>
|
|
243
|
+
|
|
244
|
+
<!-- cspell:ignore dlnotes >
|
package/README.md
CHANGED
|
@@ -30,23 +30,23 @@ All infrastructure and data flows are designed with **maximum transparency, self
|
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
.
|
|
33
|
-
├── .github/workflows # CI workflows and automation
|
|
34
|
-
├── .vscode/
|
|
33
|
+
├── .github/workflows/ # CI workflows and automation
|
|
34
|
+
├── .vscode/ # Recommended VS Code settings, extensions
|
|
35
35
|
├── netlify-functions/
|
|
36
|
-
│ └── cspReport.js
|
|
37
|
-
├── scripts/
|
|
36
|
+
│ └── cspReport.js # Serverless function to receive and log CSP violation reports
|
|
37
|
+
├── scripts/ # Utility scripts
|
|
38
38
|
├── src/
|
|
39
|
-
│ ├── lib/
|
|
40
|
-
│ ├── routes/
|
|
41
|
-
│ ├── hooks.client.ts
|
|
42
|
-
│ ├── hooks.server.js
|
|
43
|
-
│ ├── app.html
|
|
44
|
-
│ └── service-worker.js
|
|
45
|
-
├── static/
|
|
39
|
+
│ ├── lib/ # Reusable components, styles, utilities
|
|
40
|
+
│ ├── routes/ # SvelteKit routes (+page.svelte, +page.server.js)
|
|
41
|
+
│ ├── hooks.client.ts # Handles PWA install prompt and logs client errors
|
|
42
|
+
│ ├── hooks.server.js # Injects CSP headers and permissions policy
|
|
43
|
+
│ ├── app.html # SvelteKit entry HTML with CSP/meta/bootentry
|
|
44
|
+
│ └── service-worker.js # Custom Service Worker
|
|
45
|
+
├── static/ # Static assets served at root
|
|
46
46
|
├── tests/
|
|
47
|
-
│ ├── e2e/
|
|
48
|
-
│ └── unit/
|
|
49
|
-
├── netlify.toml
|
|
47
|
+
│ ├── e2e/ # End-to-end Playwright tests
|
|
48
|
+
│ └── unit/ # Vite unit tests
|
|
49
|
+
├── netlify.toml # Netlify configuration
|
|
50
50
|
└── ...
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -169,18 +169,18 @@ This project includes custom runtime configuration files for enhancing security,
|
|
|
169
169
|
|
|
170
170
|
### 🔐 `hooks.server.js`
|
|
171
171
|
|
|
172
|
-
Located at src/hooks.server.js
|
|
172
|
+
Located at `src/hooks.server.js`, this file is responsible for injecting dynamic security headers. It includes:
|
|
173
173
|
|
|
174
174
|
- Content Security Policy (CSP) with support for relaxed directives (inline scripts allowed)
|
|
175
175
|
- Permissions Policy to explicitly disable unnecessary browser APIs
|
|
176
176
|
- X-Content-Type-Options, X-Frame-Options, and Referrer-Policy headers
|
|
177
177
|
|
|
178
|
-
> 💡 The CSP nonce feature has been disabled. Inline scripts are now allowed through the policy using the "script-src 'self' 'unsafe-inline'" directive. If you wish to use nonces in the future, you can re-enable them by uncommenting the relevant sections in hooks.server.js and modifying your inline
|
|
178
|
+
> 💡 The CSP nonce feature has been disabled. Inline scripts are now allowed through the policy using the `"script-src 'self' 'unsafe-inline'"` directive. If you wish to use nonces in the future, you can re-enable them by uncommenting the relevant sections in `hooks.server.js` and modifying your inline `<script>` tags.
|
|
179
179
|
|
|
180
180
|
To re-enable nonce generation for inline scripts in the future:
|
|
181
181
|
|
|
182
|
-
1. Uncomment the nonce generation and injection logic in hooks.server.js
|
|
183
|
-
2. Add nonce="**cspNonce**" to inline
|
|
182
|
+
1. Uncomment the nonce generation and injection logic in `hooks.server.js`.
|
|
183
|
+
2. Add `nonce="**cspNonce**"` to inline `<script>` blocks in `app.html` or route templates.
|
|
184
184
|
|
|
185
185
|
> 💡 The `[headers]` block in `netlify.toml` has been deprecated — all headers are now set dynamically from within SvelteKit.
|
|
186
186
|
|
|
@@ -246,7 +246,7 @@ This project uses a mix of automated performance, accessibility, and end-to-end
|
|
|
246
246
|
|
|
247
247
|
### Running Tests
|
|
248
248
|
|
|
249
|
-
Local testing via Playwright:
|
|
249
|
+
Local testing via Vitest and Playwright:
|
|
250
250
|
|
|
251
251
|
```bash
|
|
252
252
|
npm run test:client # Run client-side unit tests with Vitest
|
|
@@ -254,6 +254,7 @@ npm run test:server # Run server-side unit tests with Vitest
|
|
|
254
254
|
npm run test:all # Run full test suite
|
|
255
255
|
npm run test:watch # Watch mode for client tests
|
|
256
256
|
npm run test:coverage # Collect code coverage reports
|
|
257
|
+
npm run test:e2e # Runs Playwright E2E tests
|
|
257
258
|
```
|
|
258
259
|
|
|
259
260
|
Audit your app using Lighthouse:
|
|
@@ -406,6 +407,7 @@ The following CLI commands are available via `npm run <script>` or `pnpm run <sc
|
|
|
406
407
|
| `test:server` | Run server-side tests with Vitest |
|
|
407
408
|
| `test:watch` | Watch mode for client tests |
|
|
408
409
|
| `test:coverage` | Collect coverage from both client and server |
|
|
410
|
+
| `test:e2e` | Run Playwright E2E tests |
|
|
409
411
|
|
|
410
412
|
---
|
|
411
413
|
|
package/_redirects
CHANGED
package/cspell.json
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"./.netlify/shims.js"
|
|
6
6
|
],
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.7.0",
|
|
8
8
|
"description": "Locking Down Networks, Unlocking Confidence | Security, Networking, Privacy — Network Pro Strategies",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"advisory",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"node": ">=22.0.0 <25",
|
|
37
37
|
"npm": ">=11.0.0 <12"
|
|
38
38
|
},
|
|
39
|
-
"style": "src/lib/styles/index.js",
|
|
40
39
|
"scripts": {
|
|
41
40
|
"dev": "vite dev",
|
|
42
41
|
"start": "npm run dev",
|
|
@@ -61,6 +60,7 @@
|
|
|
61
60
|
"test:server": "vitest --config vitest.config.server.js",
|
|
62
61
|
"test:watch": "vitest --config vitest.config.client.js --watch",
|
|
63
62
|
"test:coverage": "npm run test:client -- --run --coverage && npm run test:server -- --run --coverage",
|
|
63
|
+
"test:e2e": "npx playwright test",
|
|
64
64
|
"lint": "eslint . --ext .mjs,.js,.svelte",
|
|
65
65
|
"lint:fix": "eslint . --ext .mjs,.js,.svelte --fix",
|
|
66
66
|
"lint:jsdoc": "eslint . --ext .js,.mjs,.svelte --max-warnings=0",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"nodemailer": "^7.0.3",
|
|
81
|
-
"posthog-js": "^1.
|
|
81
|
+
"posthog-js": "^1.248.1",
|
|
82
82
|
"semver": "^7.7.2",
|
|
83
|
-
"svelte": "5.33.
|
|
83
|
+
"svelte": "5.33.6"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@eslint/compat": "^1.2.9",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@testing-library/svelte": "^5.2.8",
|
|
95
95
|
"@vitest/coverage-v8": "^3.1.4",
|
|
96
96
|
"autoprefixer": "^10.4.21",
|
|
97
|
-
"browserslist": "^4.
|
|
97
|
+
"browserslist": "^4.25.0",
|
|
98
98
|
"eslint": "^9.27.0",
|
|
99
99
|
"eslint-config-prettier": "^10.1.5",
|
|
100
100
|
"eslint-plugin-jsdoc": "^50.6.17",
|
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
"markdownlint": "^0.38.0",
|
|
106
106
|
"markdownlint-cli2": "^0.18.1",
|
|
107
107
|
"mdsvex": "^0.12.6",
|
|
108
|
-
"normalize.css": "^8.0.1",
|
|
109
108
|
"playwright": "^1.52.0",
|
|
110
109
|
"postcss": "^8.5.3",
|
|
111
110
|
"prettier": "^3.5.3",
|
package/playwright.config.js
CHANGED
|
@@ -36,6 +36,7 @@ export default defineConfig({
|
|
|
36
36
|
baseURL: "http://localhost:4173?nosw", // Update to use preview server URL
|
|
37
37
|
trace: "on-first-retry",
|
|
38
38
|
timeout: 60000, // Default action timeout of 60 seconds for each step
|
|
39
|
+
navigationTimeout: 60000, // Timeout for navigation operations
|
|
39
40
|
},
|
|
40
41
|
|
|
41
42
|
/* Configure projects */
|
package/scripts/bundleCss.js
CHANGED
|
@@ -20,10 +20,10 @@ import { bundle } from "lightningcss";
|
|
|
20
20
|
import path from "path";
|
|
21
21
|
|
|
22
22
|
// Define the path to your input CSS file
|
|
23
|
-
const inputFilePath = path.resolve("src/lib/styles/css/
|
|
23
|
+
const inputFilePath = path.resolve("src/lib/styles/css/global.css");
|
|
24
24
|
|
|
25
25
|
// Define the path for the output CSS file
|
|
26
|
-
const outputFilePath = path.resolve("
|
|
26
|
+
const outputFilePath = path.resolve("src/lib/styles/css/global.min.css");
|
|
27
27
|
|
|
28
28
|
// Bundle and minify the CSS
|
|
29
29
|
const { code, map } = bundle({
|
package/src/app.html
CHANGED
|
@@ -24,7 +24,24 @@
|
|
|
24
24
|
sizes="any"
|
|
25
25
|
type="image/x-icon" />
|
|
26
26
|
|
|
27
|
-
<!--
|
|
27
|
+
<!-- Preconnect to PostHog domains -->
|
|
28
|
+
<link
|
|
29
|
+
rel="preconnect"
|
|
30
|
+
href="https://us.i.posthog.com"
|
|
31
|
+
crossorigin="anonymous" />
|
|
32
|
+
<link
|
|
33
|
+
rel="preconnect"
|
|
34
|
+
href="https://us-assets.i.posthog.com"
|
|
35
|
+
crossorigin="anonymous" />
|
|
36
|
+
|
|
37
|
+
<!-- Preload the PostHog script -->
|
|
38
|
+
<link
|
|
39
|
+
rel="preload"
|
|
40
|
+
href="https://us-assets.i.posthog.com/array/phc_Qshfo6AXzh4pS7aPigfqyeo4qj1qlyh7gDuHDeVMSR0/config.js"
|
|
41
|
+
as="script" />
|
|
42
|
+
<script
|
|
43
|
+
src="https://us-assets.i.posthog.com/array/phc_Qshfo6AXzh4pS7aPigfqyeo4qj1qlyh7gDuHDeVMSR0/config.js"
|
|
44
|
+
defer></script>
|
|
28
45
|
|
|
29
46
|
<!-- Preload FontAwesome webfonts -->
|
|
30
47
|
<link
|
package/src/hooks.server.js
CHANGED
|
@@ -14,54 +14,52 @@ export async function handle({ event, resolve }) {
|
|
|
14
14
|
// Create the response
|
|
15
15
|
const response = await resolve(event);
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// Check if the environment is for testing
|
|
17
|
+
// Determine environment flags
|
|
18
|
+
// Default to development policy if neither test nor prod
|
|
20
19
|
const isTestEnvironment =
|
|
21
20
|
process.env.NODE_ENV === "test" || process.env.ENV_MODE === "ci";
|
|
21
|
+
const isProdEnvironment =
|
|
22
|
+
process.env.NODE_ENV === "production" || process.env.ENV_MODE === "prod";
|
|
23
|
+
|
|
24
|
+
if (!isProdEnvironment) {
|
|
25
|
+
console.log("ENV_MODE:", process.env.ENV_MODE);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Determine report URI
|
|
29
|
+
const reportUri = isProdEnvironment
|
|
30
|
+
? "/.netlify/functions/cspReport"
|
|
31
|
+
: "/api/mock-csp";
|
|
32
|
+
|
|
33
|
+
// Construct base policy
|
|
34
|
+
const cspDirectives = [
|
|
35
|
+
"default-src 'self';",
|
|
36
|
+
"script-src 'self' 'unsafe-inline' https://us.i.posthog.com https://us-assets.i.posthog.com;",
|
|
37
|
+
"script-src-elem 'self' 'unsafe-inline' https://us.i.posthog.com https://us-assets.i.posthog.com;",
|
|
38
|
+
"style-src 'self' 'unsafe-inline';",
|
|
39
|
+
"img-src 'self' data:;",
|
|
40
|
+
"connect-src 'self' https://us.i.posthog.com https://us-assets.i.posthog.com;",
|
|
41
|
+
"font-src 'self' data:;",
|
|
42
|
+
"form-action 'self';",
|
|
43
|
+
"base-uri 'self';",
|
|
44
|
+
"object-src 'none';",
|
|
45
|
+
"frame-ancestors 'none';",
|
|
46
|
+
"upgrade-insecure-requests;",
|
|
47
|
+
`report-uri ${reportUri};`,
|
|
48
|
+
];
|
|
22
49
|
|
|
23
|
-
//
|
|
50
|
+
// Loosen up CSP for test environments
|
|
24
51
|
if (isTestEnvironment) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"img-src 'self' data:;", // Allow images from same origin and data URIs
|
|
33
|
-
"connect-src 'self';", // Allow connections only to same origin
|
|
34
|
-
"font-src 'self' data:;", // Allow fonts from same origin and data URIs
|
|
35
|
-
"form-action 'self';", // Allow forms to post to same origin
|
|
36
|
-
"base-uri 'self';", // Restrict base URIs to same origin
|
|
37
|
-
"object-src 'none';", // Block all object sources
|
|
38
|
-
"frame-ancestors 'none';", // Prevent framing of the site
|
|
39
|
-
"upgrade-insecure-requests;", // Automatically upgrade HTTP to HTTPS
|
|
40
|
-
"report-uri /api/mock-csp;", // Mock CSP reports for testing
|
|
41
|
-
].join(" "),
|
|
42
|
-
);
|
|
43
|
-
} else {
|
|
44
|
-
// Production or development environment: use a more restrictive CSP
|
|
45
|
-
response.headers.set(
|
|
46
|
-
"Content-Security-Policy",
|
|
47
|
-
[
|
|
48
|
-
"default-src 'self';",
|
|
49
|
-
"script-src 'self' 'unsafe-inline' https://us.i.posthog.com https://us-assets.i.posthog.com;", // Allow PostHog's script from both sources
|
|
50
|
-
"script-src-elem 'self' 'unsafe-inline' https://us.i.posthog.com https://us-assets.i.posthog.com;", // Allow inline scripts from PostHog's sources
|
|
51
|
-
"style-src 'self' 'unsafe-inline';",
|
|
52
|
-
"img-src 'self' data:;",
|
|
53
|
-
"connect-src 'self' https://us.i.posthog.com https://us-assets.i.posthog.com;", // Allow connections to both PostHog sources
|
|
54
|
-
"font-src 'self' data:;",
|
|
55
|
-
"form-action 'self';",
|
|
56
|
-
"base-uri 'self';",
|
|
57
|
-
"object-src 'none';",
|
|
58
|
-
"frame-ancestors 'none';",
|
|
59
|
-
"upgrade-insecure-requests;",
|
|
60
|
-
`report-uri ${process.env.ENV_MODE === "prod" ? "/.netlify/functions/cspReport" : "/api/mock-csp"};`,
|
|
61
|
-
].join(" "),
|
|
62
|
-
);
|
|
52
|
+
cspDirectives[1] =
|
|
53
|
+
"script-src 'self' 'unsafe-inline' 'unsafe-eval' ws://localhost:*;";
|
|
54
|
+
cspDirectives[2] =
|
|
55
|
+
"script-src-elem 'self' 'unsafe-inline' 'unsafe-eval' ws://localhost:*;";
|
|
56
|
+
cspDirectives[3] = "style-src 'self' 'unsafe-inline';";
|
|
57
|
+
cspDirectives[4] = "img-src 'self' data:;";
|
|
58
|
+
cspDirectives[5] = "connect-src 'self';";
|
|
63
59
|
}
|
|
64
60
|
|
|
61
|
+
response.headers.set("Content-Security-Policy", cspDirectives.join(" "));
|
|
62
|
+
|
|
65
63
|
// Set other security headers
|
|
66
64
|
response.headers.set(
|
|
67
65
|
"Permissions-Policy",
|
|
@@ -79,8 +77,7 @@ export async function handle({ event, resolve }) {
|
|
|
79
77
|
"gamepad=()",
|
|
80
78
|
"serial=()",
|
|
81
79
|
"publickey-credentials-get=()",
|
|
82
|
-
"
|
|
83
|
-
"topics=()",
|
|
80
|
+
"browsing-topics=()",
|
|
84
81
|
].join(", "),
|
|
85
82
|
);
|
|
86
83
|
|
|
@@ -91,7 +88,7 @@ export async function handle({ event, resolve }) {
|
|
|
91
88
|
if (process.env.ENV_MODE !== "test" && process.env.ENV_MODE !== "ci") {
|
|
92
89
|
response.headers.set(
|
|
93
90
|
"Strict-Transport-Security",
|
|
94
|
-
"max-age=
|
|
91
|
+
"max-age=31536000; includeSubDomains;", // No preload here
|
|
95
92
|
);
|
|
96
93
|
}
|
|
97
94
|
|
|
@@ -7,13 +7,28 @@ This file is part of Network Pro.
|
|
|
7
7
|
========================================================================== -->
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Optional: Allows vertical centering of the section
|
|
12
|
+
* @type {boolean}
|
|
13
|
+
*/
|
|
14
|
+
export let centered = false;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Additional classes for the outer full-width wrapper
|
|
18
|
+
* @type {string}
|
|
19
|
+
*/
|
|
20
|
+
export let outerClass = "";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Additional classes for the inner container
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
export let containerClass = "";
|
|
11
27
|
</script>
|
|
12
28
|
|
|
13
|
-
<div class=
|
|
14
|
-
<div class=
|
|
29
|
+
<div class={`full-width-section ${centered ? "centered" : ""} ${outerClass}`}>
|
|
30
|
+
<div class={`container ${containerClass}`}>
|
|
15
31
|
<slot></slot>
|
|
16
|
-
<!-- Slot to allow child content -->
|
|
17
32
|
</div>
|
|
18
33
|
</div>
|
|
19
34
|
|
|
@@ -13,15 +13,15 @@ This file is part of Network Pro.
|
|
|
13
13
|
//console.log("Base path:", base);
|
|
14
14
|
|
|
15
15
|
const termsLink = `${base}/terms-of-use`;
|
|
16
|
-
const privacyLink = `${base}/privacy
|
|
16
|
+
const privacyLink = `${base}/privacy`;
|
|
17
17
|
const licenseLink = `${base}/license`;
|
|
18
|
+
const pdashLink = `${base}/privacy-dashboard`;
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Navigation link object.
|
|
21
22
|
* @typedef {Object} NavLink
|
|
22
23
|
* @property {string} href - The URL the link points to.
|
|
23
24
|
* @property {string} text - The text displayed for the link.
|
|
24
|
-
* @property {string} target - Specifies where to open the link (e.g., "_self" or "_blank").
|
|
25
25
|
* @property {number} [colspan] - Optional property to specify column span for the table cell.
|
|
26
26
|
*/
|
|
27
27
|
|
|
@@ -31,46 +31,48 @@ This file is part of Network Pro.
|
|
|
31
31
|
*/
|
|
32
32
|
const rows = [
|
|
33
33
|
[
|
|
34
|
-
{
|
|
35
|
-
href: termsLink,
|
|
36
|
-
text: "Terms of Use",
|
|
37
|
-
target: "_self",
|
|
38
|
-
},
|
|
39
34
|
{
|
|
40
35
|
href: privacyLink,
|
|
41
36
|
text: "Privacy Policy",
|
|
42
|
-
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
href: pdashLink,
|
|
40
|
+
text: "Privacy Dashboard",
|
|
43
41
|
},
|
|
44
42
|
],
|
|
45
43
|
[
|
|
44
|
+
{
|
|
45
|
+
href: termsLink,
|
|
46
|
+
text: "Terms of Use",
|
|
47
|
+
},
|
|
46
48
|
{
|
|
47
49
|
href: licenseLink,
|
|
48
50
|
text: "Legal",
|
|
49
|
-
target: "_self",
|
|
50
|
-
colspan: 2,
|
|
51
51
|
},
|
|
52
52
|
],
|
|
53
53
|
];
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
<!-- BEGIN LEGAL NAVIGATION -->
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
class=
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
</
|
|
74
|
-
</
|
|
75
|
-
</
|
|
57
|
+
<nav aria-label="Legal navigation">
|
|
58
|
+
<div class="bnav-wrap">
|
|
59
|
+
<table class="bnav">
|
|
60
|
+
<tbody>
|
|
61
|
+
{#each rows as row}
|
|
62
|
+
<tr>
|
|
63
|
+
{#each row as link}
|
|
64
|
+
<td class="bnav-cell" colspan={link.colspan || 1}>
|
|
65
|
+
<a href={link.href} target="_self">
|
|
66
|
+
{link.text}
|
|
67
|
+
</a>
|
|
68
|
+
</td>
|
|
69
|
+
{/each}
|
|
70
|
+
</tr>
|
|
71
|
+
{/each}
|
|
72
|
+
</tbody>
|
|
73
|
+
</table>
|
|
74
|
+
</div>
|
|
75
|
+
</nav>
|
|
76
76
|
<!-- END LEGAL NAVIGATION -->
|
|
77
|
+
|
|
78
|
+
<!-- cspell:ignore pdash bnav -->
|
|
@@ -10,15 +10,27 @@ This file is part of Network Pro.
|
|
|
10
10
|
import posthog from "posthog-js";
|
|
11
11
|
import { onMount } from "svelte";
|
|
12
12
|
import { browser } from "$app/environment";
|
|
13
|
+
import { shouldTrackUser } from "$lib/utils/privacy.js";
|
|
13
14
|
|
|
14
|
-
// cspell:disable
|
|
15
15
|
onMount(() => {
|
|
16
|
-
if (browser)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
if (!browser) return;
|
|
17
|
+
|
|
18
|
+
const allowTracking = shouldTrackUser();
|
|
19
|
+
|
|
20
|
+
// cspell:disable-next-line
|
|
21
|
+
posthog.init("phc_Qshfo6AXzh4pS7aPigfqyeo4qj1qlyh7gDuHDeVMSR0", {
|
|
22
|
+
api_host: "https://us.i.posthog.com",
|
|
23
|
+
loaded: (ph) => {
|
|
24
|
+
if (!allowTracking) {
|
|
25
|
+
console.log("[PostHog] ⛔ User opted out — disabling tracking");
|
|
26
|
+
ph.opt_out_capturing(); // Fully disable any tracking
|
|
27
|
+
} else {
|
|
28
|
+
console.log("[PostHog] ✅ Tracking enabled");
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
autocapture: allowTracking, // Optional: Disable autocapture
|
|
32
|
+
capture_pageview: allowTracking, // Optional: Disable initial pageview
|
|
33
|
+
person_profiles: "identified_only",
|
|
34
|
+
});
|
|
22
35
|
});
|
|
23
|
-
//cspell:enable
|
|
24
36
|
</script>
|
|
@@ -14,7 +14,7 @@ This file is part of Network Pro.
|
|
|
14
14
|
import { bySvg, ccSvg } from "$lib";
|
|
15
15
|
|
|
16
16
|
// Log the base path to verify its value
|
|
17
|
-
console.log("Base path:", base);
|
|
17
|
+
//console.log("Base path:", base);
|
|
18
18
|
|
|
19
19
|
// Dynamic links for licensing and trademark
|
|
20
20
|
const ccbyLink = `${base}/license#cc-by`;
|
|
@@ -10,7 +10,7 @@ This file is part of Network Pro.
|
|
|
10
10
|
import { base } from "$app/paths";
|
|
11
11
|
|
|
12
12
|
// Log the base path to verify its value
|
|
13
|
-
console.log("Base path:", base);
|
|
13
|
+
//console.log("Base path:", base);
|
|
14
14
|
|
|
15
15
|
const homeLink = base || "/";
|
|
16
16
|
const aboutLink = `${base}/about`;
|
|
@@ -62,7 +62,7 @@ This file is part of Network Pro.
|
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
64
|
<!-- BEGIN DEFAULT HEADER -->
|
|
65
|
-
<nav class="center-nav">
|
|
65
|
+
<nav class="center-nav" aria-label="Site navigation">
|
|
66
66
|
{#each nav as { label, href, target, external }, index}
|
|
67
67
|
<a {href} {target} rel={external ? rel : undefined}>
|
|
68
68
|
{label}
|
|
@@ -10,7 +10,7 @@ This file is part of Network Pro.
|
|
|
10
10
|
import { base } from "$app/paths";
|
|
11
11
|
|
|
12
12
|
// Log the base path to verify its value
|
|
13
|
-
console.log("Base path:", base);
|
|
13
|
+
//console.log("Base path:", base);
|
|
14
14
|
|
|
15
15
|
const aboutLink = `${base}/about`;
|
|
16
16
|
const fossLink = `${base}/foss-spotlight`;
|
|
@@ -60,7 +60,7 @@ This file is part of Network Pro.
|
|
|
60
60
|
</script>
|
|
61
61
|
|
|
62
62
|
<!-- BEGIN HOME HEADER -->
|
|
63
|
-
<nav class="center-nav">
|
|
63
|
+
<nav class="center-nav" aria-label="Homepage navigation">
|
|
64
64
|
{#each nav as { label, href, target, external }, index}
|
|
65
65
|
<a {href} {target} rel={external ? rel : undefined}>
|
|
66
66
|
{label}
|
package/src/lib/images.js
CHANGED
|
@@ -10,11 +10,12 @@ This file is part of Network Pro.
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Image import utility
|
|
13
|
-
* Provides convenient access to images in the src/lib/img directory
|
|
14
13
|
*
|
|
14
|
+
* @file images.js
|
|
15
|
+
* @description Provides convenient access to images in the src/lib/img directory
|
|
15
16
|
* @module src/lib
|
|
16
17
|
* @author SunDevil311
|
|
17
|
-
* @updated 2025-05-
|
|
18
|
+
* @updated 2025-05-28
|
|
18
19
|
*/
|
|
19
20
|
|
|
20
21
|
// Import favicon images
|
package/src/lib/img/logo-web.png
CHANGED
|
Binary file
|
|
Binary file
|
package/src/lib/index.js
CHANGED
|
@@ -8,8 +8,9 @@ This file is part of Network Pro.
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Library index file
|
|
11
|
-
* Main export point for library components, utilities, and assets
|
|
12
11
|
*
|
|
12
|
+
* @file index.js
|
|
13
|
+
* @description Main export point for library components, utilities, and assets
|
|
13
14
|
* @module src/lib
|
|
14
15
|
* @author SunDevil311
|
|
15
16
|
* @updated 2025-05-14
|