Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zelogik opened this issue Mar 18, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@zelogik
Copy link

zelogik commented Mar 18, 2024

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
@zelogik zelogik added the bug Something isn't working label Mar 18, 2024
@martadinata666
Copy link
Member

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 #247 that may interest you

@zelogik
Copy link
Author

zelogik commented 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 ?

@nitnelave
Copy link
Member

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

@zelogik
Copy link
Author

zelogik commented Mar 18, 2024

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

@nitnelave nitnelave closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants