Skip to content

docs(protect-edge): explain HTML-vs-JSON path types in the overview - #52

Merged
forgetso merged 2 commits into
mainfrom
feat/protect-edge-html-vs-json
Aug 4, 2026
Merged

docs(protect-edge): explain HTML-vs-JSON path types in the overview#52
forgetso merged 2 commits into
mainfrom
feat/protect-edge-html-vs-json

Conversation

@forgetso

@forgetso forgetso commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

Adds a new "Protecting HTML pages vs JSON APIs" section to the edge integration overview at `/protect-edge/`. Explains:

  • HTML paths — cookie-less first-visit passes through so the Protect script can load and create a session; subsequent requests hit the verdict path.
  • JSON paths — cookie-less request 401s with `X-Prosopo-Status: no-session`; the Protect script intercepts, creates a session, and replays. Never passes through — no HTML shell to bootstrap from.
  • How to configure via `defaultPathType` + per-endpoint rules on the dashboard, and why this closes the "spoof `Accept: text/html` on an API endpoint" bypass.
  • Which mode fits which kind of site (server-rendered, SPA, pure API), with a lookup table.

Test plan

  • `npm run check` — 0 errors.
  • Renders inline in the overview page, ahead of the "Correlation" section.

🤖 Generated with Claude Code

Adds a "Protecting HTML pages vs JSON APIs" section to the edge
integration overview. Explains:

- HTML paths: cookie-less first-visit passes through so the Protect
  script can load and create a session; subsequent requests hit the
  verdict path.
- JSON paths: cookie-less request 401s with X-Prosopo-Status: no-session;
  the Protect script intercepts, creates a session, and replays. Never
  passes through — no HTML shell to bootstrap from.
- How to configure via defaultPathType + per-endpoint rules on the
  Prosopo dashboard, and why this closes the Accept-header spoof
  bypass.
- Which mode fits which kind of site (server-rendered, SPA, pure API),
  with a table.

Verified: astro check 0 errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

Deploy Preview for peaceful-pothos-9e62ce ready!

Name Link
🔨 Latest commit fe08ee9
🔍 Latest deploy log https://app.netlify.com/projects/peaceful-pothos-9e62ce/deploys/6a71fbbf6f19e90008c43010
😎 Deploy Preview https://deploy-preview-52--peaceful-pothos-9e62ce.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

"HTML SPA shell" was internal terminology and confusing for readers
who aren't building a single-page app. Reword to "HTML page" and
"HTML pages" throughout. The "Single-page app" row in the mode-fit
table stays — it's how most devs describe their own project.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@forgetso
forgetso merged commit bf5a84c into main Aug 4, 2026
4 checks passed
@forgetso
forgetso deleted the feat/protect-edge-html-vs-json branch August 4, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant