{"action":"closed","issue":{"url":"https://api.github.com/repos/ola-ct/ctSESAM-server/issues/4","labels_url":"https://api.github.com/repos/ola-ct/ctSESAM-server/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/ola-ct/ctSESAM-server/issues/4/comments","events_url":"https://api.github.com/repos/ola-ct/ctSESAM-server/issues/4/events","html_url":"https://github.com/ola-ct/ctSESAM-server/issues/4","id":115328651,"number":4,"title":"HTTP-Authentifizierung mit FastCGI","user":{"login":"stelas","id":15674535,"avatar_url":"https://avatars.githubusercontent.com/u/15674535?v=3","gravatar_id":"","url":"https://api.github.com/users/stelas","html_url":"https://github.com/stelas","followers_url":"https://api.github.com/users/stelas/followers","following_url":"https://api.github.com/users/stelas/following{/other_user}","gists_url":"https://api.github.com/users/stelas/gists{/gist_id}","starred_url":"https://api.github.com/users/stelas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stelas/subscriptions","organizations_url":"https://api.github.com/users/stelas/orgs","repos_url":"https://api.github.com/users/stelas/repos","events_url":"https://api.github.com/users/stelas/events{/privacy}","received_events_url":"https://api.github.com/users/stelas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ola-ct/ctSESAM-server/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ola-ct/ctSESAM-server/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-05T17:02:35Z","updated_at":"2015-11-17T09:23:15Z","closed_at":"2015-11-17T09:23:15Z","body":"Hi,\r\n\r\nin Shared-Webhosting-Umgebungen wird PHP zumeist per FastCGI angebunden. Um die HTTP-Authentifizierung dort ans Laufen zu bringen, ist am Sync-Server folgende kleine Ergänzung erforderlich:\r\n\r\n.htaccess\r\n```\r\nRewriteEngine on\r\nRewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]\r\n```\r\n\r\najax/globals.php - am Anfang in assert_basic_auth() einfügen:\r\n```php\r\n    if (preg_match('/Basic\\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches)) {\r\n        list($name, $password) = explode(':', base64_decode($matches[1]));\r\n        $_SERVER['PHP_AUTH_USER'] = strip_tags($name);\r\n        $_SERVER['PHP_AUTH_PW'] = strip_tags($password);\r\n    }\r\n```\r\n\r\nWäre schön, wenn es in die nächste Revision einfließen würde. :smile:\r\n\r\nGruß Steffen"}}