Can't put bitwarden behind cloudflare proxy #1380

Closed
opened 2025-11-26 22:46:57 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @brgirgis on GitHub (Nov 22, 2021).

Steps To Reproduce

  1. Standup a bitwarden server.
  2. Put bitwarden behind a cloudflare DNS and enable proxy and basic protection to detect humans
  3. Access bitwarden through the web interface to make sure it is accessible.
  4. Open the Android app to find a message that says "An Error has occurred" or something similar.

I think it is fair to assume that the admin of the bitwarden deployment should be allowed to have something basic like cloudflare proxy protection in front of their services.

Expected Result

To be able to open the vault and interact normally with it.

Actual Result

The error message offers no help for why or how to fix that and the app becomes fully un-operational.

Screenshots or Videos

No response

Additional Context

No response

Operating System

Android

Operating System Version

12

Device

Pixel 3

Build Version

Version: 2.14.2 (4005)

Beta

  • Using a pre-release version of the application.
Originally created by @brgirgis on GitHub (Nov 22, 2021). ### Steps To Reproduce 1. Standup a bitwarden server. 2. Put bitwarden behind a cloudflare DNS and enable proxy and basic protection to detect humans 3. Access bitwarden through the web interface to make sure it is accessible. 4. Open the Android app to find a message that says "An Error has occurred" or something similar. I think it is fair to assume that the admin of the bitwarden deployment should be allowed to have something basic like cloudflare proxy protection in front of their services. ### Expected Result To be able to open the vault and interact normally with it. ### Actual Result The error message offers no help for why or how to fix that and the app becomes fully un-operational. ### Screenshots or Videos _No response_ ### Additional Context _No response_ ### Operating System Android ### Operating System Version 12 ### Device Pixel 3 ### Build Version Version: 2.14.2 (4005) ### Beta - [ ] Using a pre-release version of the application.
Author
Owner

@cscharf commented on GitHub (Nov 22, 2021):

Hi @brgirgis, Re:

basic protection to detect humans

Is this to mean you're using Cloudflare's CAPTCHA/bot detection on the API? If this is the case, that will cause many things to break as Cloudflare cannot natively handle API traffic with a CAPTCHA as it will respond with HTML or a JS response, which breaks the Bitwarden client. You would need to contain or custom-filter based on /path in Cloudflare's more advanced configuration to separate the API from the web vault SPA itself.

As far as the error you're getting, without CAPTCHA enabled, there are many things that can go wrong with external proxies and configuration, certificates, etc. that may lead to failures. Do you have crash logs, trace information or server logs pertaining to the failure?

@cscharf commented on GitHub (Nov 22, 2021): Hi @brgirgis, Re: > basic protection to detect humans Is this to mean you're using Cloudflare's CAPTCHA/bot detection on the API? If this is the case, that will cause many things to break as Cloudflare cannot natively handle API traffic with a CAPTCHA as it will respond with HTML or a JS response, which breaks the Bitwarden client. You would need to contain or custom-filter based on `/path` in Cloudflare's more advanced configuration to separate the API from the web vault SPA itself. As far as the error you're getting, without CAPTCHA enabled, there are many things that can go wrong with external proxies and configuration, certificates, etc. that may lead to failures. Do you have crash logs, trace information or server logs pertaining to the failure?
Author
Owner

@ERR0RPR0MPT commented on GitHub (Dec 17, 2022):

Hi @brgirgis, Re:

basic protection to detect humans

Is this to mean you're using Cloudflare's CAPTCHA/bot detection on the API? If this is the case, that will cause many things to break as Cloudflare cannot natively handle API traffic with a CAPTCHA as it will respond with HTML or a JS response, which breaks the Bitwarden client. You would need to contain or custom-filter based on /path in Cloudflare's more advanced configuration to separate the API from the web vault SPA itself.

As far as the error you're getting, without CAPTCHA enabled, there are many things that can go wrong with external proxies and configuration, certificates, etc. that may lead to failures. Do you have crash logs, trace information or server logs pertaining to the failure?

Hello, I also encountered this problem.

The reason is that due to China's network censorship, I used Cloudflare as a proxy to avoid censorship. However, Bitwarden Android, which was originally accessible directly, had an error after connecting to Cloudflare.

This issue does not occur with Bitwarden clients on other platforms.

@ERR0RPR0MPT commented on GitHub (Dec 17, 2022): > Hi @brgirgis, Re: > > > basic protection to detect humans > > Is this to mean you're using Cloudflare's CAPTCHA/bot detection on the API? If this is the case, that will cause many things to break as Cloudflare cannot natively handle API traffic with a CAPTCHA as it will respond with HTML or a JS response, which breaks the Bitwarden client. You would need to contain or custom-filter based on `/path` in Cloudflare's more advanced configuration to separate the API from the web vault SPA itself. > > As far as the error you're getting, without CAPTCHA enabled, there are many things that can go wrong with external proxies and configuration, certificates, etc. that may lead to failures. Do you have crash logs, trace information or server logs pertaining to the failure? Hello, I also encountered this problem. The reason is that due to China's network censorship, I used Cloudflare as a proxy to avoid censorship. However, Bitwarden Android, which was originally accessible directly, had an error after connecting to Cloudflare. This issue does not occur with Bitwarden clients on other platforms.
Author
Owner

@vvolkgang commented on GitHub (Jun 20, 2024):

Issue migrated to https://github.com/bitwarden/mobile/issues/1657

@vvolkgang commented on GitHub (Jun 20, 2024): Issue migrated to https://github.com/bitwarden/mobile/issues/1657
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#1380