cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use the nginx to browse the sare url

How to use the nginx to browse the sare url

ELEWYG
New member | Level 2

下面是dropbox的分享URL,直接访问是可以的

browse the dropbox share url indirect is okay:
https://dl.dropboxusercontent.com/scl/fi/e6mzswmo6nb1al3xo2q6h/20240531154801_MACID_42957_.png?rlkey...

 

但通过我们自己服务器的NGINX代理访问,却只能访问到dropbox的404错误页,访问不到真实的分享文件

but browse the share url through my nginx server is 404 error,just like follow picture show,I don't know whereis error.

 

微信图片_20240531222600.png
下面是通过访问我们自己服务器的代码来访问dropbox的url:

this is my URL   through  my nginx server to request:

https://www.smartwarrior.com.au/api/dropbox/api/scl/fi/e6mzswmo6nb1al3xo2q6h/20240531154801_MACID_42...

我们的nginx设置如下:

my nginx server seting like this:


location /api/dropbox/api/{

client_max_body_size 100M;

 

add_header Access-Control-Allow-Origin *;


proxy_pass https://dl.dropboxusercontent.com/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
}

2 Replies 2

Greg-DB
Dropbox Staff

It looks like you're not using the Dropbox API, but are trying to configure nginx. As nginx isn't made by Dropbox, we can't provide support for that. You may need to refer to the support resources for nginx for information on how to configure it.

Здравко
Legendary | Level 20

@ELEWYG wrote:

...
proxy_set_header Host $host;
...


Hi @ELEWYG,

I'm a bit confused about the cited configuration line. 🤔 Why is it there and what is it supposed to do? 🤷 Did you try the same (resulted) request in your browser (the same request your server send to Dropbox) or in some other way? 🧐 Try catch the request (dump it somehow) and see what's there. 😉

Good luck and hope this helps.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?