[GH-ISSUE #870] [BUG] subpath don't work with image lldap/lldap:2024-03-07-debian|alpine #311

Closed
opened 2026-02-27 08:16:35 +03:00 by kerem · 4 comments
Owner

Originally created by @zelogik on GitHub (Mar 18, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/870

Describe the bug
subpath don't work as expected even with the commit/70d85524db4d7070f1fda499702bbbd3ec2dd8b5 with lldap/lldap:2024-03-07-debian|alpine

To Reproduce
Steps to reproduce the behavior:

  1. LLDAP_HTTP_URL: https://example.com/lldap
  2. setup ingress, etc...
  3. get the lldap/lldap:2024-03-07-debian|alpine image
  4. go to https://example.com/lldap
  5. We got a blank page (with "old" index.html)

Expected behavior
Get the index.html from "app: make it possible to serve lldap behind a sub-path" | commit/70d85524db4d7070f1fda499702bbbd3ec2dd8b5
is the lldap/lldap:2024-03-07-debian|alpine is based on main branch ?

Logs
Not interesting

Additional context
To correct:

  1. go inside docker container or k8s pod
  2. rm old /app/app/index.html
  3. add/write index.htlm from: commit/70d85524db4d7070f1fda499702bbbd3ec2dd8b5
Originally created by @zelogik on GitHub (Mar 18, 2024). Original GitHub issue: https://github.com/lldap/lldap/issues/870 **Describe the bug** subpath don't work as expected even with the commit/70d85524db4d7070f1fda499702bbbd3ec2dd8b5 with lldap/lldap:2024-03-07-debian|alpine **To Reproduce** Steps to reproduce the behavior: 1. LLDAP_HTTP_URL: https://example.com/lldap 2. setup ingress, etc... 3. get the lldap/lldap:2024-03-07-debian|alpine image 4. go to https://example.com/lldap 5. We got a blank page (with "old" index.html) **Expected behavior** Get the index.html from "app: make it possible to serve lldap behind a sub-path" | commit/70d85524db4d7070f1fda499702bbbd3ec2dd8b5 is the lldap/lldap:2024-03-07-debian|alpine is based on main branch ? **Logs** Not interesting **Additional context** To correct: 1. go inside docker container or k8s pod 2. rm old /app/app/index.html 3. add/write index.htlm from: commit/70d85524db4d7070f1fda499702bbbd3ec2dd8b5
kerem 2026-02-27 08:16:35 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@martadinata666 commented on GitHub (Mar 18, 2024):

docker container use index_local.html as default rather than index.html due constraint that the js file doesn't load on an offline environment. https://github.com/lldap/lldap/tree/main/app there is also this thread https://github.com/lldap/lldap/issues/247 that may interest you

<!-- gh-comment-id:2004135714 --> @martadinata666 commented on GitHub (Mar 18, 2024): docker container use index_local.html as default rather than index.html due constraint that the js file doesn't load on an offline environment. https://github.com/lldap/lldap/tree/main/app there is also this thread https://github.com/lldap/lldap/issues/247 that may interest you
Author
Owner

@zelogik commented on GitHub (Mar 18, 2024):

@martadinata666 : thanks, I understand why the file index_local.html exist now.
Already got a view on #247, and a quick reading on same-origin and CORS vulnerability/security.
But why many app still use subpath|dir ?

So there is no "clean way" to have the index.html (not the index_local.html) or that working version

<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>LLDAP Administration</title>
    <base href="/">
    <script src="static/main.js" type="module" defer></script>
    <link
      href="static/bootstrap-nightshade.min.css"
      rel="preload stylesheet"
      integrity="sha384-CvItGYrXmque42UjYhp+bjRR8tgQz78Nlwk42gYsNzBc6y0DuXNtdUaRzr1cl2uK"
      as="style" />
    <script
      src="static/bootstrap.bundle.min.js"
      integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"></script>
    <script
    src="static/darkmode.min.js"
    integrity="sha384-A4SLs39X/aUfwRclRaXvNeXNBTLZdnZdHhhteqbYFS2jZTRD79tKeFeBn7SGXNpi"></script>
    <link
      rel="stylesheet"
      href="static/bootstrap-icons.css"
      integrity="sha384-tKLJeE1ALTUwtXlaGjJYM3sejfssWdAaWR2s97axw4xkiAdMzQjtOjgcyw0Y50KU"
      as="style" />
    <link
      rel="stylesheet"
      integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
      href="static/font-awesome.min.css" />
    <link
      rel="stylesheet"
      href="static/fonts.css" />
    <link
      rel="stylesheet"
      href="static/style.css" />
    <script>
      function inDarkMode(){
        return darkmode.inDarkMode;
      }
    </script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>
    <noscript>
        <!-- This will be displayed if the user doesn't have JavaScript enabled. -->
        LLDAP requires JavaScript, please switch to a compatible browser or
        enable it.
    </noscript>

    <script>
        /* Detect if the user has WASM support. */
        if (typeof WebAssembly === 'undefined') {
            const pWASMMsg = document.createElement("p")
            pWASMMsg.innerHTML = `
            LLDAP requires WASM and JIT for JavaScript, please switch to a
            compatible browser or enable it.
            `
            document.body.appendChild(pWASMMsg)
        }
    </script>
</body>

</html>

With docker for the moment ?

<!-- gh-comment-id:2004211773 --> @zelogik commented on GitHub (Mar 18, 2024): @martadinata666 : thanks, I understand why the file index_local.html exist now. Already got a view on #247, and a quick reading on same-origin and CORS vulnerability/security. But why many app still use subpath|dir ? So there is no "clean way" to have the index.html (not the index_local.html) or that working version ``` <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>LLDAP Administration</title> <base href="/"> <script src="static/main.js" type="module" defer></script> <link href="static/bootstrap-nightshade.min.css" rel="preload stylesheet" integrity="sha384-CvItGYrXmque42UjYhp+bjRR8tgQz78Nlwk42gYsNzBc6y0DuXNtdUaRzr1cl2uK" as="style" /> <script src="static/bootstrap.bundle.min.js" integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"></script> <script src="static/darkmode.min.js" integrity="sha384-A4SLs39X/aUfwRclRaXvNeXNBTLZdnZdHhhteqbYFS2jZTRD79tKeFeBn7SGXNpi"></script> <link rel="stylesheet" href="static/bootstrap-icons.css" integrity="sha384-tKLJeE1ALTUwtXlaGjJYM3sejfssWdAaWR2s97axw4xkiAdMzQjtOjgcyw0Y50KU" as="style" /> <link rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" href="static/font-awesome.min.css" /> <link rel="stylesheet" href="static/fonts.css" /> <link rel="stylesheet" href="static/style.css" /> <script> function inDarkMode(){ return darkmode.inDarkMode; } </script> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <noscript> <!-- This will be displayed if the user doesn't have JavaScript enabled. --> LLDAP requires JavaScript, please switch to a compatible browser or enable it. </noscript> <script> /* Detect if the user has WASM support. */ if (typeof WebAssembly === 'undefined') { const pWASMMsg = document.createElement("p") pWASMMsg.innerHTML = ` LLDAP requires WASM and JIT for JavaScript, please switch to a compatible browser or enable it. ` document.body.appendChild(pWASMMsg) } </script> </body> </html> ``` With docker for the moment ?
Author
Owner

@nitnelave commented on GitHub (Mar 18, 2024):

You can have the index.html locally, and then mount the file over the existing one when you create the container.

<!-- gh-comment-id:2004237991 --> @nitnelave commented on GitHub (Mar 18, 2024): You can have the index.html locally, and then mount the file over the existing one when you create the container.
Author
Owner

@zelogik commented on GitHub (Mar 18, 2024):

Yes of course, but it's what i call a "no clean way" to do it ;-)

<!-- gh-comment-id:2004310335 --> @zelogik commented on GitHub (Mar 18, 2024): Yes of course, but it's what i call a "no clean way" to do it ;-)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#311
No description provided.