cafbe5bb79
close !6 commit77ed77aa93
Author: Lukas Schulz <lukas.schulz@simiworld.de> Date: Tue Dec 1 21:33:13 2020 +0100 repositioned second CORS header commitfe01c721a6
Author: Lukas Schulz <lukas.schulz@simiworld.de> Date: Tue Dec 1 21:32:36 2020 +0100 escaped ' commit6b50ef9de5
Author: Lukas Schulz <lukas.schulz@simiworld.de> Date: Tue Dec 1 21:28:24 2020 +0100 repositioned cors header commitcdaad1a973
Author: Lukas Schulz <lukas.schulz@simiworld.de> Date: Tue Dec 1 21:25:29 2020 +0100 added cors header commitbc30682b9e
Author: Lukas Schulz <lukas.schulz@simiworld.de> Date: Tue Dec 1 21:21:15 2020 +0100 changed cdn-url to https to fix mixed content stuff Signed-off-by: hexchen <hexchen@lilwit.ch>
25 lines
527 B
Nix
25 lines
527 B
Nix
{config, lib, pkgs, ...}:
|
|
|
|
{
|
|
imports = [
|
|
./common.nix
|
|
];
|
|
services.nginx = {
|
|
virtualHosts."${config.networking.hostName}.live.hacc.media" = {
|
|
locations = {
|
|
"/" = {
|
|
return = "301 \"https://$cdnhosts$request_uri\"";
|
|
extraConfig = ''
|
|
auth_basic off;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
appendHttpConfig = ''
|
|
split_clients "$remote_addr" $cdnhosts {
|
|
50% "cdn-node-1.live.hacc.media";
|
|
50% "cdn-node-2.live.hacc.media";
|
|
}
|
|
'';
|
|
};
|
|
}
|