Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • lemonldap-ng lemonldap-ng
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 329
    • Issues 329
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • LemonLDAP NG
  • lemonldap-nglemonldap-ng
  • Issues
  • #2650

Closed
Open
Created Oct 27, 2021 by Maxime Besson@maxbes🔧Maintainer

Empty SCRIPT_NAME breaks the portal

Concerned version

Version: 2.0.13

Platform: Apache + mod_proxy_uwsgi

Summary

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?

Assignee
Assign to
Time tracking