adminPassword = mkOption { type = str; description = "Admin password for mypads / admin"; };
session_key = mkOption { type = str; description = "Session key"; };
api_key = mkOption { type = str; description = "API key"; };
- redirects = mkOption { type = str; description = "Redirects for apache"; };
};
};
};
RewriteEngine On
- RewriteMap redirects "txt:${pkgs.writeText "redirects.txt" config.myEnv.tools.etherpad-lite.redirects}"
- RewriteCond %{QUERY_STRING} "!noredirect"
- RewriteCond %{REQUEST_URI} "^(.*)$"
- RewriteCond ''${redirects:$1|Unknown} "!Unknown"
- RewriteRule "^(.*)$" ''${redirects:$1} [L,NE,R=301,QSD]
-
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) unix://${ecfg.sockets.node}|ws://ether.immae.eu/$1 [P,NE,QSA,L]