Empty SCRIPT_NAME breaks the portal
Platform: Apache + mod_proxy_uwsgi
I'm trying to run the portal behind Apache + mod_proxy_uwsgi With the following simple config:
ProxyPass /static ! ProxyPass / uwsgi://localhost:5000/
Apache sets SCRIPT_NAME to an empty value. The LLNG code (sendJs, sendHtml) tends to replace it with '.':
my $sc = $req->script_name; $sc = '.' unless ($sc); $sc =~ s#/*$#/#;
Which works in GET /, but not in GET /oauth2/authorize, GET /saml/singleSignOn, etc. In those cases ./psgi.js is loaded at /oauth2/psgi.js, /saml/psgi.js etc.
@guimard do you remember why you set
. as the value when $req->script_name is empty?
According to the PSGI spec, SCRIPT_NAME "may be an empty string if the application corresponds to the server's root URI."
So in that case, we should load
/psgi.js (absolute URL) and not
./psgi.js, right? Was there another use case where
. was needed?