hkoba / yatt_lite

YATT::Lite - Template with "use strict"
Other
5 stars 0 forks source link

better :script_uri (which cares HTTP_X_FORWARDED_PROTO) #205

Closed hkoba closed 3 years ago

hkoba commented 3 years ago

$env->{SCRIPT_URI}, which is not standardized in PSGI Environment but is long available in Apache CGI, is a handy way to refer to the absolute URI of the current page. But unfortunately, it usually returns "http:" URI when the app is placed behind a Load Balancer.

So, let's change &yatt:script_uri; to replace URI scheme with HTTP_X_FORWARDED_PROTO if it is available.