mirror of https://gitlab.crans.org/nounous/nixos
Merge branch 'nextcloud' into 'main'
Nextcloud See merge request nounous/nixos!80merge-requests/80/merge
commit
e6f4c5cfce
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
hostName = "nextcloud.crans.org";
|
hostName = "nextcloud.crans.org";
|
||||||
https = false;
|
https = true;
|
||||||
|
|
||||||
maxUploadSize = "4G";
|
maxUploadSize = "4G";
|
||||||
|
|
||||||
|
|
@ -42,10 +42,23 @@
|
||||||
# hodaur
|
# hodaur
|
||||||
"172.16.10.145"
|
"172.16.10.145"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
|
mail_domain = "crans.org";
|
||||||
|
mail_from_address = "root";
|
||||||
|
mail_smtphost = "smtp.crans.org";
|
||||||
|
mail_smtpport = 25;
|
||||||
|
};
|
||||||
|
|
||||||
appstoreEnable = true;
|
appstoreEnable = true;
|
||||||
extraAppsEnable = true;
|
extraAppsEnable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Activation CORS pour récuppérer les agendas depuis le wiki
|
||||||
|
# TODO: à mettre que sur /remote.php/dav/public-calendars/ pour éviter des requêtes malveillantes depuis le wiki.
|
||||||
|
services.nginx.virtualHosts.${config.services.nextcloud.hostName}.extraConfig = ''
|
||||||
|
add_header 'Access-Control-Allow-Origin' 'https://mediawiki.crans.org' always;
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET' always;
|
||||||
|
add_header 'Access-Control-Allow-Credentials' 'false' always;
|
||||||
|
add_header 'Vary' 'Origin' always;
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,13 @@
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
|
|
||||||
clientMaxBodySize = "512M";
|
clientMaxBodySize = "512M";
|
||||||
|
|
||||||
|
# On trust nos ip internes pour bien indiquer le client au bout
|
||||||
|
# i.e. on considère pas le reverseproxy comme notre client
|
||||||
|
appendHttpConfig = ''
|
||||||
|
set_real_ip_from 172.16.0.0/16;
|
||||||
|
set_real_ip_from fd00::/56;
|
||||||
|
real_ip_header X-Real-Ip;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue