forked from DGNum/infrastructure
feat(kanidm): Upgrade to rc.16 and fix an issue with CORS..........
This commit is contained in:
parent
dd721feb2f
commit
39da96f325
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, sources, ... }:
|
||||
|
||||
let
|
||||
domain = "sso.dgnum.eu";
|
||||
|
@ -18,6 +18,8 @@ in
|
|||
services.kanidm = {
|
||||
enableServer = true;
|
||||
|
||||
package = (import sources.nixos-unstable { }).kanidm;
|
||||
|
||||
serverSettings = {
|
||||
inherit domain;
|
||||
|
||||
|
@ -55,6 +57,8 @@ in
|
|||
set $origin 'https://${domain}';
|
||||
}
|
||||
|
||||
proxy_hide_header Access-Control-Allow-Origin;
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' "$origin" always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PATCH, PUT, DELETE, OPTIONS' always;
|
||||
|
|
Loading…
Reference in a new issue