API V2 Webserver Changes Needed

For the past couple of days I've been currently rewriting the API portion of Organizr...  For this API to work we need to add a new location block to your webserver.

While I was writing the API again, I kind of decided to rewrite the core portion of Organizr as well.  Hopefully it will speed up Organizr a little bit.  

Please add a new location block to your webserver configuration.  Also if you use Nginx's auth_request - you will need to update the address for that from: 

location ~ ^/auth-(.*) {
	## Has to be local ip or local DNS name or if Proxied use proxy address
	proxy_pass http://organizr-upstream/api/?v1/auth&group=$1;
	proxy_pass_request_body off;
	proxy_set_header Content-Length "";
}

To this new address:

location ~ ^/auth-(.*) {
	## Has to be local ip or local DNS name or if Proxied use proxy address
	proxy_pass http://organizr-upstream/api/v2/auth?group=$1;
	proxy_pass_request_body off;
	proxy_set_header Content-Length "";
}

Docker

If you haven't switched over to the new Official Docker, do that now:

https://github.com/Organizr/docker-organizr#migration

If you modified the default Nginx file, and the startup script didn't manage to add the /api/v2 location, add the configuration as described below, or recreate the default by deleting it. 

 

Nginx

location /api/v2 {
	try_files $uri /api/v2/index.php$is_args$args;
}

 

Apache

RewriteEngine On
RewriteBase /api/v2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /api/v2/index.php [QSA,L]