Open wucke13 opened 3 years ago
cc @Ma27 @mweinelt
I marked this as stale due to inactivity. → More info
still a problem, and not just for matrix
I ran into a related issue. It would be good if the nginx module allowed overriding the gixy
check in some straightforward way. (Incidentally, it's a bit confusing that writeNginxConfig
also runs a linter over it -- wouldbe nicer if that were a separate checkNginxConfig
call.)
Anyway, my hacky work-around (in a flake-based nixos config):
outputs = {
self,
nixpkgs,
}: let
system = "x86_64-linux";
rawpkgs = import nixpkgs {inherit system;};
pkgs =
rawpkgs
// {
writers.writeNginxConfig = name: text:
rawpkgs.runCommandLocal name {
inherit text;
passAsFile = ["text"];
nativeBuildInputs = [pkgs.gixy];
}
''
awk -f ${rawpkgs.writers.awkFormatNginx} "$textPath" | sed '/^\s*$/d' > $out
gixy --skips host_spoofing $out
'';
});
in {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
inherit system pkgs;
modules = [
...
This patches the writeNginxConfig
function to call gixy
while skipping a particular test.
Just ran into this. It seems like a flag configure, or at least disable, gixy would be a good idea.
Just ran into gixy's origins
rule, which is meant for Referer validation. Except what I'm doing is not validating the Referer, I do not care if it is invalid, I just need to tweak some behaviour depending on the Referer.
Gixy's documentation does not state a way to fix this "medium" severity issue, and after a lot of trial-and-error, I could not figure it out. It makes up lots of strings that are not even valid URLs in the first place, and also ones that do not match the given regex, then complains about these matching. It even complains about the regex if it matches only the intended URL. I don't understand what the issue with that would be, even if I were validating the Referer.
In my opinion,
extraConfig
. This was not easy for me to find out in the first place.
Describe the bug This manual section does not work on my 21.05 system. The reason is that the nginx config check does not pass, due to nested
add_header
directives overriding externaladd_header
directives. This error output is generated:To Reproduce Follow the manual entry while simultaneously setting any sane and recommended
add_header
setting in nginx, likeservices.nginx.appendHttpConfig = "add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
Expected behavior The configuration can be build
Additional context For good measure, a bunch of
add_header
directives should be in place on any nginx. It would be good to allow this kind of "problem" in the nginx config.Notify maintainers @globin , @fpletz
Maintainer information: