deiucanta / chatpad

Not just another ChatGPT user-interface!
https://chatpad.ai
GNU Affero General Public License v3.0
1.36k stars 253 forks source link

.htapasswd option #66

Open Stehos opened 1 year ago

Stehos commented 1 year ago

Hi, I am trying to secure access to my chatpad.ai application running inside docker on my vps.

simply adding the following to my nginx website.conf:

    auth_basic "Administrator’s Area";
    auth_basic_user_file /etc/nginx/.htpasswd;

After this change, when I try to visit my application and after confirming credentials, the application is not loaded and in the console, there are these errors:

` Object { _e: Error, name: "DatabaseClosedError", message: "InvalidStateError A mutation operation was attempted on a database that did not allow mutations.\n InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.", inner: {…}, stack: "" } index.020772d9.js:31:72520

Object { _e: Error, name: "DatabaseClosedError", message: "InvalidStateError A mutation operation was attempted on a database that did not allow mutations.\n InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.", inner: {…}, stack: "" } index.020772d9.js:31:72520

Object { _e: Error, name: "DatabaseClosedError", message: "InvalidStateError A mutation operation was attempted on a database that did not allow mutations.\n InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.", inner: {…}, stack: "" } `

Is there any option to secure the app under username/password protection so it can not be visited by everyone?

Thanks for the advice.

jonasbg commented 1 year ago

You could check out authelia or NGINX Proxy Manager to secure your apps. Would that work?