[GH-ISSUE #2119] Firefox plugin does not work with custom headers #1310

Open
opened 2026-03-02 11:56:25 +03:00 by kerem · 4 comments
Owner

Originally created by @danhusan on GitHub (Nov 11, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2119

Describe the Bug

When adding custom headers to the Firefox plugin it errors out when trying to authenticate with the following message: "NetworkError when attempting to fetch resource."
This happens regardless if the server in the other end requires headers or not.
The same headers / setup work fine with the Android app.

Steps to Reproduce

Install firefox addon version 1.2.7
Add server address: https://try.karakeep.app
Configure custom headers:
Header name: a
Header value: b
Press add header + save

Press configure
Enter username and password, demo@karakeep.app / demodemo
Press login.

--> Error: NetworkError when attempting to fetch resource.

Expected Behaviour

Expected behaviour in this case (with the demosite) should be following error: "Mutations are not allowed in demo mode"

Screenshots or Additional Context

No response

Device Details

Firefox 144.0.2, Windows 11

Exact Karakeep Version

Plugin version 1.2.7

Have you checked the troubleshooting guide?

  • I have checked the troubleshooting guide and I haven't found a solution to my problem
Originally created by @danhusan on GitHub (Nov 11, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2119 ### Describe the Bug When adding custom headers to the Firefox plugin it errors out when trying to authenticate with the following message: "NetworkError when attempting to fetch resource." This happens regardless if the server in the other end requires headers or not. The same headers / setup work fine with the Android app. ### Steps to Reproduce Install firefox addon version 1.2.7 Add server address: https://try.karakeep.app Configure custom headers: Header name: a Header value: b Press add header + save Press configure Enter username and password, demo@karakeep.app / demodemo Press login. --> Error: NetworkError when attempting to fetch resource. ### Expected Behaviour Expected behaviour in this case (with the demosite) should be following error: "Mutations are not allowed in demo mode" ### Screenshots or Additional Context _No response_ ### Device Details Firefox 144.0.2, Windows 11 ### Exact Karakeep Version Plugin version 1.2.7 ### Have you checked the troubleshooting guide? - [x] I have checked the troubleshooting guide and I haven't found a solution to my problem
Author
Owner

@MohamedBassem commented on GitHub (Nov 11, 2025):

The custom headers are probably blocked by CORS in the extension. Whoever you're passing those custom headers to should strip them (and not forward them) to karakeep's server.

<!-- gh-comment-id:3516508660 --> @MohamedBassem commented on GitHub (Nov 11, 2025): The custom headers are probably blocked by CORS in the extension. Whoever you're passing those custom headers to should strip them (and not forward them) to karakeep's server.
Author
Owner

@danhusan commented on GitHub (Nov 11, 2025):

I might have simplified the details a bit too much due to my lack of knowledge around CORS.

I have a karakeep setup running behind a reverse-proxy (pangolin, basically traefik). When turning on header-auth in this setup I end up with a working Android app. The Firefox plugin however does not - and gives me the "NetworkError when attempting to fetch resource."

That is why I am suspecting the plugin and not the pangolin/reverse proxy setup.

<!-- gh-comment-id:3518234516 --> @danhusan commented on GitHub (Nov 11, 2025): I might have simplified the details a bit too much due to my lack of knowledge around CORS. I have a karakeep setup running behind a reverse-proxy (pangolin, basically traefik). When turning on header-auth in this setup I end up with a working Android app. The Firefox plugin however does not - and gives me the "NetworkError when attempting to fetch resource." That is why I am suspecting the plugin and not the pangolin/reverse proxy setup.
Author
Owner

@keyxmakerx commented on GitHub (Dec 23, 2025):

Same, though cosmos cloud is my proxy.

<!-- gh-comment-id:3687927251 --> @keyxmakerx commented on GitHub (Dec 23, 2025): Same, though cosmos cloud is my proxy.
Author
Owner

@italicize9610 commented on GitHub (Dec 29, 2025):

hello, i found the solution for cloudflare tunnel + cloudflare access for Firefox. on the access application (Applications > the application controlling Karakeep > Advanced Settings > CORS settings), set the following:

Bypass options requests to origin (leave OFF)
Access-Control-Allow-Credentials (leave OFF)
Access-Control-Max-Age (seconds) (leave blank)
Access-Control-Allow-Origin (see below, should be in the format moz-extension://)
Access-Control-Allow-Methods (tick Allow all methods)
Access-Control-Allow-Headers (tick Allow all HTTP headers)

How to get the moz-extension

  1. about:debugging#/runtime/this-firefox in Firefox
  2. Find your Karakeep extension
  3. The moz-extension://UUID or else the Manifest URL (minus the manifest.json)

Then it should work. For other tunnels/reverse proxies, I'm not too sure.

<!-- gh-comment-id:3695486304 --> @italicize9610 commented on GitHub (Dec 29, 2025): hello, i found the solution for cloudflare tunnel + cloudflare access for Firefox. on the access application (Applications > the application controlling Karakeep > Advanced Settings > CORS settings), set the following: Bypass options requests to origin (leave OFF) Access-Control-Allow-Credentials (leave OFF) Access-Control-Max-Age (seconds) (leave blank) Access-Control-Allow-Origin (see below, should be in the format moz-extension://<id>) Access-Control-Allow-Methods (tick Allow all methods) Access-Control-Allow-Headers (tick Allow all HTTP headers) **How to get the moz-extension** 1. about:debugging#/runtime/this-firefox in Firefox 2. Find your Karakeep extension 3. The moz-extension://UUID or else the Manifest URL (minus the manifest.json) Then it should work. For other tunnels/reverse proxies, I'm not too sure.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1310
No description provided.