Hwaro::Services::DevCorsHandler
Inherits HTTP::Handler < Reference < Object
Emits Access-Control-Allow-Origin: * on every dev-server response so
a site loaded via one local hostname can still fetch() resources
served under another — the canonical example being localhost:3000
in the address bar while {{ base_url }} was baked as
http://127.0.0.1:3000 (the default bind). Same-origin policy treats
those as different origins and would otherwise block the fetch.
Dev-only: the built output is untouched. Matches what other SSG dev servers do (Zola, Hugo).
Constructors
Instance methods
call(context)
Source