[dreamwidth/dreamwidth] d9d5d5: Add subdomain function middleware for Plack
Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: d9d5d5787dec9abc065bafbdd67b6809ae059928 https://github.com/dreamwidth/dreamwidth/commit/d9d5d5787dec9abc065bafbdd67b6809ae059928 Author: Mark Smith mark@dreamwidth.org Date: 2026-02-01 (Sun, 01 Feb 2026)
Changed paths: M app.psgi A cgi-bin/Plack/Middleware/DW/SubdomainFunction.pm A t/plack-subdomain.t
Log Message:
Add subdomain function middleware for Plack
Plack had no equivalent of the Apache::LiveJournal::trans subdomain routing logic, so requests to shop.dreamwidth.org/randomgift would 404 instead of redirecting to www.dreamwidth.org/shop/randomgift.
New middleware handles functional subdomains (shop, support, mobile) by checking %LJ::SUBDOMAIN_FUNCTION and redirecting or rewriting the URI, matching Apache behavior.
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com
To unsubscribe from these emails, change your notification settings at https://github.com/dreamwidth/dreamwidth/settings/notifications
