Welcome! Log In Create A New Profile

Advanced

Reverse proxy MS OneDrive WebDav

Posted by nothingman 
Reverse proxy MS OneDrive WebDav
October 02, 2017 03:24PM
Hi,
In my company there is a network policy that does not allows to access to MS OneDrive using with the client or by mapping the account as a webdav folder pointing the URL https://d.docs.live.net/XXXXXXXXXXX. (the url https://d.docs.live.net is blocked by the firewall).
Since the firewall allows to access to my home ip address where I have a raspberry running nginx, do you think is it possible to reverse proxy onedrive webdav access ? In other words, I want to map a webdav folder by pointing an address like this https://<my-public-raspberry-ip>/onedrive and the contex "/onedrive" should map to https://d.docs.live.net/<XXXXXXXX> where <XXXXXXXX> is my onedrive customer ID.
I already tried something like this but with no success:

location /onedrive {
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;

set $destination $http_destination;

if ($destination ~* ^https(.+)$) {
set $destination http$1;
}

proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header Destination $destination;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header ns_server-ui yes;
proxy_set_header X-Forwarded-User $http_authorization;
add_header Front-End-Https on;
proxy_pass_header Accept;
proxy_pass_header Server;
proxy_http_version 1.1;

proxy_pass https://d.docs.live.net;

}


Any suggestion ?

Regards

--
Nothingman
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready