Is there a way to disable Sync Gateway basic auth requests in browser?

I recently found out we had the Guest user enabled in our development and production instances. I disabled it since I don’t want a bot being able to fill our db with random documents. I now have the problem that sync gateway sends a basic auth 401 response if a user tries to do something on our site and they are not logged in. It is a rare occurrence (e.g. a request takes a long time to get sent and they happen to click Log Out before it is sent) but I don’t want users to ever see a confusing basic auth prompt. Is there anyway to prevent sync gateway from requesting authentication in the 401 response? Is there a way to disable that, e.g. set it to return a 500 and a custom error code in the body, or a 401 but no request for basic authentication?

1 Like

We are facing the same problem.

Is there any workaround for this ?

We never found one. I just re-enabled the guest user. We use channels for authorization so they can’t create or read a document in our database anyway.