Skip to main content

Intigin dynamic-backend adapter — thin in-app WSGI middleware for view-source protection.

Project description

intigin

Thin in-app WSGI adapter for Intigin dynamic-backend protection. It wraps your app so the same Intigin bundle that protects static sites also protects your server-rendered pages — view-source shows only a loader shell, and the real HTML is reconstructed client-side.

The adapter does almost nothing: the browser bundle does the heavy lifting. On a page navigation it returns a clean loader shell (no payload, no cookie); when the bundle asks for the page (a same-URL fetch carrying an X-Intigin-Payload header) it encodes the finished HTML into the frozen wire format and returns it. The bundle at https://{host}/{token}.js decodes and reconstructs the page, then reveals, polls, and hot-swaps live like a static Intigin page — no backend round-trip on updates.

Install

pip install intigin

Use

Wrap your WSGI callable with a scoped Gateway API key (dashboard → Settings → Gateway API). The adapter resolves your public bundle token from the key once at boot, so no token is hardcoded:

from intigin import Intigin

app.wsgi_app = Intigin(app.wsgi_app, api_key="iga_...", host="intigin.com")   # recommended

Flask uses app.wsgi_app; Django wraps application in wsgi.py. A raw 32-hex token="..." is also accepted for a zero-config demo.

Behavior

  • Cookieless. The payload rides the bundle's marker fetch (the browser's own session), so nothing payload-related appears in the source and no cookie is set — cookie blockers don't affect it.
  • Non-HTML passes through untouched; only top-level HTML navigations are wrapped.
  • Fail-closed. A bad/missing key or any wrap error disables the adapter (serves your app unprotected, logged to stderr) or returns a self-contained restricted page — never the raw HTML for a failed encode.
  • Kill-switch. INTIGIN_ADAPTER_MODE=wrap|passthrough|off (env). passthrough/off removes the adapter from the path.

Conformance

python -m intigin --selftest

Verifies the frozen wire format — base64("IGP1" + FLAGS + BODY), BODY = xor(deflate(utf8(html)), sha256(token)) — against the browser bundle's decoder.

Concealment, not encryption. The scramble key is derived from the public bundle token, so this defeats view-source and naive scrapers, not cryptanalysis. Object-level authorization stays in your own routes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

intigin-1.0.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

intigin-1.0.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file intigin-1.0.0.tar.gz.

File metadata

  • Download URL: intigin-1.0.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for intigin-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1c487b3d9b05f87aa407e5154dd7eb4822896d6a27d37d6525ef6caef2638856
MD5 2f19b8b24c73bbb505767acffda305ed
BLAKE2b-256 5e90cd60837622011852a28a2b324618b0d929f63f34fabeecada7127add22cd

See more details on using hashes here.

File details

Details for the file intigin-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: intigin-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for intigin-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 532c72ba6579cb30af48ec3bb19d86e8ad7d96b14ad02ba9537140f94826d33b
MD5 2d15f07b99dcb8427527e4a50b9309ed
BLAKE2b-256 61ad882409eac507542ddc66f674a444394544f43b9a132272c5609e06a1b811

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page