{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/14125","labels_url":"https://api.github.com/repos/owncloud/core/issues/14125/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/14125/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/14125/events","html_url":"https://github.com/owncloud/core/pull/14125","id":57385799,"number":14125,"title":"[nginx] Extending X-Accel-Redirect support","user":{"login":"dratini0","id":1625485,"avatar_url":"https://avatars.githubusercontent.com/u/1625485?v=3","gravatar_id":"","url":"https://api.github.com/users/dratini0","html_url":"https://github.com/dratini0","followers_url":"https://api.github.com/users/dratini0/followers","following_url":"https://api.github.com/users/dratini0/following{/other_user}","gists_url":"https://api.github.com/users/dratini0/gists{/gist_id}","starred_url":"https://api.github.com/users/dratini0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dratini0/subscriptions","organizations_url":"https://api.github.com/users/dratini0/orgs","repos_url":"https://api.github.com/users/dratini0/repos","events_url":"https://api.github.com/users/dratini0/events{/privacy}","received_events_url":"https://api.github.com/users/dratini0/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/4%20-%20Developing","name":"4 - Developing","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/nginx","name":"nginx","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/31","html_url":"https://github.com/owncloud/core/milestones/8.1-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/31/labels","id":912160,"number":31,"title":"8.1-current","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":302,"closed_issues":445,"state":"open","created_at":"2014-12-22T12:04:01Z","updated_at":"2015-03-23T10:22:55Z","due_on":"2015-04-02T22:00:00Z","closed_at":null},"comments":22,"created_at":"2015-02-11T22:13:43Z","updated_at":"2015-03-23T11:07:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/14125","html_url":"https://github.com/owncloud/core/pull/14125","diff_url":"https://github.com/owncloud/core/pull/14125.diff","patch_url":"https://github.com/owncloud/core/pull/14125.patch"},"body":"@josh4trunks @bantu \r\nIn the last few days, I had a considerable debate (see #14090) with @josh4trunks about my earlier pull request reverting the X-Accel-Redirect support to the old, OC6 behavior (#13060). While what I did was a rushed, probably bad decision. However, I still did feel that the OC7 behavior, which, according to josh4trunks, was coined by @bantu, is inadequate, as it requires explicitly stating every user of every local mount which is not available to all users in the nginx configuration file. Therefore, I recommend to use another behavior, which works by prefixing the actual filesystem path with a configurable prefix, to avoid any collisions. I have implemented it in a way that it will not break OC7-based configs. This compromise hinges around a new environmental variable, ```MOD_X_ACCEL_REDIRECT_PREFIX```, which, if set, activates the new behavior.\r\n\r\nI am not sure if I am suited for writing a proper documentation for this (I'm not a native speaker, and I seem to be terrible at explaining things), but I have gist-ed my configuration file annotated: https://gist.github.com/dratini0/4e4a5282f25eb2d6ea9c\r\n\r\nRegarding security, I think if we use the settings that are in the gist, it is the exact same thing as the Apache version. I have been thinking about recommending to configure it with a single alias /, for simplicity's sake, saying that whatever attack can force OwnCloud to emit an X-Accel-Redirect header (only happens in addSendfileRedirect) would force it to readfile the same file on an install configured without header support, but I am not sure if this is enough.\r\n\r\nP. s.: @josh4trunks: I found out that shares are considered to be remote. I don't think that is good, but there is probably a reason for that, which I still have to figure out."},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/84952134","html_url":"https://github.com/owncloud/core/pull/14125#issuecomment-84952134","issue_url":"https://api.github.com/repos/owncloud/core/issues/14125","id":84952134,"user":{"login":"dratini0","id":1625485,"avatar_url":"https://avatars.githubusercontent.com/u/1625485?v=3","gravatar_id":"","url":"https://api.github.com/users/dratini0","html_url":"https://github.com/dratini0","followers_url":"https://api.github.com/users/dratini0/followers","following_url":"https://api.github.com/users/dratini0/following{/other_user}","gists_url":"https://api.github.com/users/dratini0/gists{/gist_id}","starred_url":"https://api.github.com/users/dratini0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dratini0/subscriptions","organizations_url":"https://api.github.com/users/dratini0/orgs","repos_url":"https://api.github.com/users/dratini0/repos","events_url":"https://api.github.com/users/dratini0/events{/privacy}","received_events_url":"https://api.github.com/users/dratini0/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T11:07:36Z","updated_at":"2015-03-23T11:07:36Z","body":"Sorry, will be doing it later today. From my testing I remember having\nproblems with slashes, so I will test again.\n"}}