-
-
Notifications
You must be signed in to change notification settings - Fork 51
Migrated website from python to nodejs and merged HAR docs #1276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
max-ostapenko
wants to merge
40
commits into
main
Choose a base branch
from
visiting-snail
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2bdcaf4
feat: migrate web app frontend to Astro and update GAE routing to ser…
max-ostapenko d0702b1
refactor: remove Python/Jinja2 server and templates in favor of a Nod…
max-ostapenko f0e7cad
feat: update UI headers, improve pagination links, and refine timesta…
max-ostapenko f5c20a4
docs: add comprehensive HTTP Archive documentation and guides structure
max-ostapenko e37a0d6
feat: implement versioned filename helper and replace Starlight heade…
max-ostapenko 4cb8ff9
style: override documentation header layout with custom height and pa…
max-ostapenko a53b588
refactor: implement comprehensive style system and optimize FAQ initi…
max-ostapenko 0d91e60
chore: reorganize project dependencies and devDependencies in package…
max-ostapenko ac31257
fix: remove redundant normalize.css source comment from bootstrap.min…
max-ostapenko fa43e0d
fix: resolve font preload duplicate downloads and CSP violations
max-ostapenko 2ba80b6
feat: add dynamic page timestamp management to Base layout using last…
max-ostapenko 6daf7d6
fix: refactor website test script and workflows to support fully Node…
max-ostapenko 30488f5
Potential fix for pull request finding 'CodeQL / Client-side cross-si…
max-ostapenko a3be0c6
Potential fix for pull request finding 'CodeQL / Log injection'
max-ostapenko b61b456
Potential fix for pull request finding 'CodeQL / Unused variable, imp…
max-ostapenko ae6d7bb
feat: add data analysis workbooks and refactor documentation and inde…
max-ostapenko d9cfa65
chore: update documentation content hashes in last_updated.json
max-ostapenko 01f4aa4
chore: update project documentation
max-ostapenko 8180e57
chore: upgrade local linter configuration
max-ostapenko f9c3dc5
refactor: remove legacy static CSS files, update deployment config, a…
max-ostapenko ce8acb9
refactor: migrate Highcharts to module-based initialization via highc…
max-ostapenko ee2b5a8
refactor: inline summary component styles into SummaryCard.astro and …
max-ostapenko 5b3492c
refactor: migrate all static assets to the public directory for Astro…
max-ostapenko 67444a5
Merge branch 'main' into visiting-snail
max-ostapenko d28629c
refactor: remove font module imports and update icon SVG symbols
max-ostapenko 36cfd76
Merge branch 'visiting-snail' of https://github.com/HTTPArchive/httpa…
max-ostapenko de493ae
refactor: remove Python dependencies and modernize build configuratio…
max-ostapenko d433d71
refactor: migrate deployment and testing scripts from Python to Node.…
max-ostapenko 0296cc6
chore: remove unused .htmlhintrc_morechecks configuration file
max-ostapenko f0f263d
Merge branch 'main' into visiting-snail
max-ostapenko ed38d9b
feat: revert .htmlhintrc_morechecks configuration
max-ostapenko 25e2994
refactor: update test workflow to keep server running and exclude nod…
max-ostapenko 9886803
fix: disable valid-source-maps in lighthouse, add tech report filter …
max-ostapenko a7c1580
feat: enable build sourcemaps via environment variable and re-enable …
max-ostapenko b604418
fix: improve security and update server configuration
max-ostapenko 986d842
unnecessary escape
max-ostapenko 8fcddb5
Merge branch 'main' into visiting-snail
max-ostapenko e9f960a
refactor: replace object with Map for latestMetricDates and latestMet…
max-ostapenko 8b0c110
fix: enhance path normalization and sanitization to prevent directory…
max-ostapenko 122d5cc
refactor: centralize API base URL constants and remove deprecated loc…
max-ostapenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,7 @@ templates/sitemap.xml | |
| .coverage | ||
| .idx/dev.nix | ||
| .coverage.* | ||
| .pytest_cache | ||
| __pycache__ | ||
| .astro/ | ||
| /dist | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,48 +1,84 @@ | ||
| runtime: python312 | ||
| entrypoint: gunicorn -b :$PORT main:app | ||
| runtime: nodejs24 | ||
| entrypoint: node server.js | ||
| default_expiration: 3h | ||
|
|
||
| handlers: | ||
|
|
||
| # Add longer caching for fonts | ||
| - url: /static/fonts/(.*\.(woff|woff2))$ | ||
| static_files: static/fonts/\1 | ||
| upload: static/fonts/.*\.(woff|woff2)$ | ||
| secure: always | ||
| expiration: 365d | ||
| http_headers: | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| vary: Accept-Encoding | ||
|
|
||
| # Set the UTF-8 charset for CSS and JS files. | ||
| # Makes the assumption that only CSS and JS files existing in the relevant dirs | ||
| # but avoids complex regexes | ||
| - url: /static/css | ||
| static_dir: static/css | ||
| secure: always | ||
| http_headers: | ||
| content-type: text/css; charset=utf-8 | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| vary: Accept-Encoding | ||
| - url: /static/js | ||
| static_dir: static/js | ||
| secure: always | ||
| http_headers: | ||
| content-type: application/javascript; charset=utf-8 | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| vary: Accept-Encoding | ||
|
|
||
| - url: /static | ||
| static_dir: static | ||
| secure: always | ||
| http_headers: | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| vary: Accept-Encoding | ||
|
|
||
| - url: /.* | ||
| script: auto | ||
| secure: always | ||
| # Python API endpoints — must be routed to gunicorn before static handlers | ||
| - url: /metric.json | ||
| script: auto | ||
| secure: always | ||
|
|
||
| - url: /api/.* | ||
| script: auto | ||
| secure: always | ||
|
|
||
| - url: /.well-known/(.*) | ||
| static_files: static/well-known/\1 | ||
| upload: static/well-known/.* | ||
| secure: always | ||
|
|
||
| # Add longer caching for fonts | ||
| - url: /static/fonts/(.*\.(woff|woff2))$ | ||
| static_files: static/fonts/\1 | ||
| upload: static/fonts/.*\.(woff|woff2)$ | ||
| secure: always | ||
| expiration: 365d | ||
| http_headers: | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| vary: Accept-Encoding | ||
|
|
||
| # Set the UTF-8 charset for CSS and JS files. | ||
| - url: /static/css | ||
| static_dir: static/css | ||
| secure: always | ||
| http_headers: | ||
| content-type: text/css; charset=utf-8 | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| vary: Accept-Encoding | ||
| - url: /static/js | ||
| static_dir: static/js | ||
| secure: always | ||
| http_headers: | ||
| content-type: application/javascript; charset=utf-8 | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| vary: Accept-Encoding | ||
|
|
||
| - url: /static | ||
| static_dir: static | ||
| secure: always | ||
| http_headers: | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| vary: Accept-Encoding | ||
|
|
||
| # Serve Astro-built HTML pages as static files from dist/ | ||
| # Index page | ||
| - url: /$ | ||
| static_files: dist/index.html | ||
| upload: dist/index.html | ||
| secure: always | ||
| expiration: 1h | ||
| http_headers: | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| content-security-policy: "default-src 'self' https:; script-src 'self' https: 'unsafe-inline'; style-src 'self' https: 'unsafe-inline'; img-src 'self' https: data:; font-src 'self' https: data:; connect-src 'self' https:; frame-ancestors 'none'" | ||
|
|
||
| # Astro pages — serve /path as dist/path/index.html | ||
| - url: /(.+) | ||
| static_files: dist/\1/index.html | ||
| upload: dist/.*/index\.html | ||
| secure: always | ||
| expiration: 1h | ||
| http_headers: | ||
| strict-transport-security: max-age=31556926; includeSubDomains | ||
| x-content-type-options: nosniff | ||
| content-security-policy: "default-src 'self' https:; script-src 'self' https: 'unsafe-inline'; style-src 'self' https: 'unsafe-inline'; img-src 'self' https: data:; font-src 'self' https: data:; connect-src 'self' https:; frame-ancestors 'none'" | ||
|
|
||
| # Fallback: all remaining routes to Python (legacy redirects, 404s, robots.txt, .well-known) | ||
| - url: /.* | ||
| script: auto | ||
| secure: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| import { defineConfig } from 'astro/config'; | ||
| import starlight from '@astrojs/starlight'; | ||
| import starlightLinksValidator from 'starlight-links-validator'; | ||
Check noticeCode scanning / CodeQL Unused variable, import, function or class Note
Unused import starlightLinksValidator.
|
||
| import starlightLlmsTxt from 'starlight-llms-txt'; | ||
|
|
||
| export default defineConfig({ | ||
| output: 'static', | ||
| outDir: 'dist', | ||
| // Static assets pass-through from /static directory | ||
| publicDir: 'static', | ||
| // Base URL | ||
| site: 'https://httparchive.org', | ||
| build: { | ||
| // Don't add trailing slashes to output filenames | ||
| format: 'directory', | ||
| }, | ||
| integrations: [ | ||
| starlight({ | ||
| title: 'HTTP Archive Docs', | ||
| components: { | ||
| Header: './src/components/docs/Header.astro', | ||
| }, | ||
| sidebar: [ | ||
| { | ||
| label: 'Guides', | ||
| items: [ | ||
| { label: 'Getting started', link: 'docs/guides/getting-started' }, | ||
| { label: 'Minimizing query costs', link: 'docs/guides/minimizing-costs' }, | ||
| { label: 'Guided tour', link: 'docs/guides/guided-tour' }, | ||
| { label: 'Release cycle', link: 'docs/guides/release-cycle' }, | ||
| ], | ||
| }, | ||
| { | ||
| label: 'Tables', | ||
| items: [{ autogenerate: { directory: 'docs/reference/tables' } }] | ||
| }, | ||
| { | ||
| label: 'Structs', | ||
| items: [{ autogenerate: { directory: 'docs/reference/structs' } }] | ||
| }, | ||
| { | ||
| label: 'Blobs', | ||
| items: [{ autogenerate: { directory: 'docs/reference/blobs' } }] | ||
| }, | ||
| { | ||
| label: 'Custom Metrics', | ||
| items: [{ autogenerate: { directory: 'docs/reference/custom-metrics' } }] | ||
| }, | ||
| { | ||
| label: 'Functions', | ||
| items: [{ autogenerate: { directory: 'docs/reference/functions' } }] | ||
| }, | ||
| ], | ||
| plugins: [starlightLlmsTxt()], | ||
| }), | ||
| ], | ||
| vite: { | ||
| server: { | ||
| proxy: { | ||
| '/api': 'http://127.0.0.1:8080', | ||
| '/metric.json': 'http://127.0.0.1:8080', | ||
| '/.well-known': 'http://127.0.0.1:8080', | ||
| }, | ||
| }, | ||
| }, | ||
| }); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.