NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.38k stars 13.6k forks source link

[changedetection-io] bad default environment variables setting HIDE_REFERER=true #335542

Closed luochen1990 closed 4 weeks ago

luochen1990 commented 4 weeks ago

Describe the bug

Bad Request
The referrer header is missing.

Related issue Related discussion Related code

Steps To Reproduce

  services.changedetection-io = {
    enable = true;
    port = 5000;
    listenAddress = "localhost";
    baseURL = "https://xxx";
    behindProxy = true;
  };

Steps to reproduce the behavior:

  1. deploy changedetection-io using NixOS via above configuration (or anything similar)
  2. use a nginx as reverse proxy
  3. visit /settings#notifications and client SAVE bottom bellow.
  4. confirm the error message is displayed

Expected behavior

The SAVE action process successfully.

Notify maintainers

@SuperSandro2000

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"

- system: `"x86_64-linux"`
- host os: `Linux 6.9.8, NixOS, 24.11 (Vicuna), 24.11.20240706.5041afc`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.23.1`
- nixpkgs: `/nix/store/xh78jcd1jy5kx3pvjf4jdyvwl731w47z-source`

Add a :+1: reaction to issues you find important.

SuperSandro2000 commented 4 weeks ago

Please open a PR to fix that. I don't use the tool anymore because it was to buggy.

luochen1990 commented 4 weeks ago

Please open a PR to fix that.

OK, I'll do that.

I don't use the tool anymore because it was to buggy.

OT: So what is your new choice now?

SuperSandro2000 commented 4 weeks ago

Checking the website from time to time myself 😅

luochen1990 commented 4 weeks ago

Please open a PR to fix that.

I find that only delete this setting will not fix that, it might be a bug from upstream. closing this issue without solve it :(

linuxissuper commented 1 week ago

I had the same problem
setting behindProxy to false works for me

my config:

  services = {

    nginx.virtualHosts."changedetection.${config.networking.domain}" = {
      enableACME = true;
      forceSSL = true;
      locations."/" = {
        proxyPass = "http://127.0.0.1:${toString config.services.changedetection-io.port}";
      };
    };

    changedetection-io = {
      enable = true;
      behindProxy = false; #setting seems buggy: when enabled nothing works 🤷
      # datastorePath = "/var/lib/changedetection-io"; #default
      # port = 5000; #default
      baseURL = "https://changedetection.${config.networking.domain}";
    };

  };