Basic authentication set and make calls with credentials on url directly

Hello everyone,

Nice to find you in this self-hosted forum! Great!

I’m working on new pacs architecture with different kind of users.
I’ve configured Orthanc with authentication settings

// Whether or not the password protection is enabled
"AuthenticationEnabled" : true,

// The list of the registered users. Because Orthanc uses HTTP
// Basic Authentication, the passwords are stored as plain text.
"RegisteredUsers" : {
  "user": "pass"
}

and it is working.

I put my own webapp over Orthanc, so my backend makes calls to desired url directly, like http://user:pass@ip:port in order to give right permissions to requesting user. It works but I’m redirect on blank page, only after refresh/reload I can view the page (every page, e.g. /app/explorer.html).

I don’t know why. Hope someone can help me.

Thank you so much

Jacopo

– EDIT/UPDATES

With more testing I noticed this error on chrome console:

uery.mobile.min.js:73 Uncaught DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'http://***:***/app/explorer.html' cannot be created in a document with origin 'http://***:***' and URL 'http://user:pass@***:***/app/explorer.html'.
    at Object.init (http://user:pass@***:***/app/libs/jquery.mobile.min.js:73:77)
    at HTMLDocument.<anonymous> (http://user:pass@***:***/app/libs/jquery.mobile.min.js:73:189)
    at o (http://user:pass@***:***/app/libs/jquery.min.js:2:14733)
    at Object.fireWith (http://user:pass@***:***/app/libs/jquery.min.js:2:15502)
    at Function.ready (http://user:pass@***:***/app/libs/jquery.min.js:2:9594)
    at HTMLDocument.B (http://user:pass@***:***/app/libs/jquery.min.js:2:14290)
i

And contrary to what has been said, with calls like
http://user:pass@r***:***/app/explorer.html#study?uuid=id
I’m redirected to web viewer but console error remains.

Thank you again

J.

Hi!

Are you using nginx or something similiar?

Thank you fo reply.

Actually not, my backend redirects directly to containerized Orthanc.
Trying to be more accurate about this topic, this behaviour occurs also browsing Orthanc webapp without my backend layer.

J.