feat: adds spaceapi endpoint (#57)

A basic implementation of the https://spaceapi.io/ specification.
Tested working door sensor status. Added basic info about us, our website, git forge and wiki.

Co-authored with @sindos and @oysteikt.

Reviewed-on: #57
Co-authored-by: Felix Albrigtsen <felix@albrigtsen.it>
Co-committed-by: Felix Albrigtsen <felix@albrigtsen.it>
This commit is contained in:
2024-05-18 20:05:13 +02:00
parent 13a6df92ce
commit 7bf2c31db3
2 changed files with 72 additions and 0 deletions

View File

@@ -198,6 +198,10 @@ in
fastcgi_pass unix:${config.services.phpfpm.pools."pvv-nettsiden".socket};
'';
"= /spaceapi.php".extraConfig = ''
add_header Content-Type application/json;
'';
# based on https://simplesamlphp.org/docs/stable/simplesamlphp-install.html#configuring-nginx
"^~ /simplesaml/" = {
alias = "${finalPackage}/${finalPackage.passthru.simplesamlphpPath}/public/";