tools/embed/jumphp-embed.php: one PHP file (7.4+, curl) that signs the requests to the playground's /api/embed/<slug>/ (HMAC-SHA256 over method, path, query, time and body hash), serves the application under the partner's base path (streamed, Range, gzip passed through, immutable files kept on disk), relays the TCP tickets with the visitor's address, and gives the blocks (disk cache, ETag revalidation, last copy when the playground is down); no cookie either way, security headers. Its end-to-end test (tools/embed/tests/test.sh, Docker), the WordPress plugin (shortcode [jumphp_block app block], the base path answered at plugins_loaded, settings page, secret possibly in wp-config.php), nginx / Caddy / plain PHP examples. docs/embed.md (+ .en), docs/domains.md (+ .en), AGENTS.md section 14. Co-Authored-By: Claude Opus 5.5 <[email protected]>
18 lines
1 KiB
Nginx Configuration File
18 lines
1 KiB
Nginx Configuration File
# nginx in front of a site: /chat/ answered by the JumPHP embed kit (tools/embed/jumphp-embed.php, docs/embed.md), the rest as before.
|
|
# The kit streams the big files itself: no buffering, a long timeout. Keep the secret out of the web root (an fastcgi_param or the
|
|
# PHP-FPM pool's env[]).
|
|
location = /chat { return 301 /chat/$is_args$args; }
|
|
location ^~ /chat/ {
|
|
gzip off; # the kit passes the playground's gzip through
|
|
fastcgi_buffering off;
|
|
fastcgi_read_timeout 300s;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME /srv/jumphp-embed/jumphp-embed.php;
|
|
fastcgi_param JUMPHP_EMBED_SERVER https://jumphp.net;
|
|
fastcgi_param JUMPHP_EMBED_APP caramail-chat;
|
|
fastcgi_param JUMPHP_EMBED_SITE es_xxxxxxxxxxxxxxxxxxxx;
|
|
fastcgi_param JUMPHP_EMBED_SECRET jes_xxxxxxxx; # or env[JUMPHP_EMBED_SECRET] in the FPM pool
|
|
fastcgi_param JUMPHP_EMBED_BASE /chat;
|
|
fastcgi_param JUMPHP_EMBED_CACHE /var/cache/jumphp-embed;
|
|
fastcgi_pass unix:/run/php/php-fpm.sock;
|
|
}
|