add option to turn on DISALLOW_IMAGE_TRANSCODING
This commit is contained in:
parent
705764f62d
commit
35eabea591
|
@ -27,9 +27,12 @@
|
|||
jdk = final.openjdk19;
|
||||
};
|
||||
piped-proxy = final.callPackage ./packages/proxy {};
|
||||
piped-proxy-openssl = piped-proxy.override { withOpenSSL = true; };
|
||||
piped-proxy-minimal = piped-proxy.override { withAVIF = false; withWebP = false; };
|
||||
piped-proxy-minimal-openssl = piped-proxy-minimal.override { withOpenSSL = true; };
|
||||
piped-proxy-openssl = piped-proxy.override {withOpenSSL = true;};
|
||||
piped-proxy-minimal = piped-proxy.override {
|
||||
withAVIF = false;
|
||||
withWebP = false;
|
||||
};
|
||||
piped-proxy-minimal-openssl = piped-proxy-minimal.override {withOpenSSL = true;};
|
||||
piped-backend-deps = final.callPackage ./packages/backend/deps.nix {
|
||||
jdk = final.openjdk19;
|
||||
};
|
||||
|
|
|
@ -274,6 +274,12 @@ in {
|
|||
default = 3002;
|
||||
};
|
||||
|
||||
disallowImageTranscoding = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "turns off transcoding thumbnails/other to webp/avif if client adds those to allowed mime types on image requests; may use a lot of CPU depending on how many users";
|
||||
};
|
||||
|
||||
nginx = {
|
||||
disableNginx = mkOption {
|
||||
type = types.bool;
|
||||
|
|
|
@ -35,6 +35,7 @@ in {
|
|||
wantedBy = ["multi-user.target"];
|
||||
environment.BIND = "0.0.0.0:${toString proxyConfig.internalPort}";
|
||||
environment.IPV4_ONLY = mkIf proxyConfig.proxyIPv4Only "1";
|
||||
environment.DISALLOW_IMAGE_TRANSCODING = mkIf proxyConfig.disallowImageTranscoding "1";
|
||||
serviceConfig = {
|
||||
ExecStart = "${proxyConfig.package}/bin/piped-proxy";
|
||||
|
||||
|
|
Loading…
Reference in a new issue