Nginx Accept-Ranges

发布时间:2016-12-6 18:13:37 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"Nginx Accept-Ranges",主要涉及到Nginx Accept-Ranges方面的内容,对于Nginx Accept-Ranges感兴趣的同学可以参考一下。

0 down vote favorite I have an app working from localhost:8888 using tornado, and this is the headers i'v set: def set_default_headers(self): self.add_header("Access-Control-Allow-Origin", "*") self.add_header("Access-Control-Expose-Headers","Accept-Ranges") self.add_header("Access-Control-Expose-Headers","Content-Encoding") self.add_header("Access-Control-Expose-Headers"," Content-Length") self.add_header("Access-Control-Expose-Headers","Content-Range") the app on localhot:8888 needs to get a static file from locahost:80, and the nginx server on localhost:80 looks like this: server { listen 80; server_name localhost; root /var/www/statics; passenger_enabled on; passenger_use_global_queue on; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Origin [http://localhost:8888;] add_header Access-Control-Expose-Headers Accept-Ranges; add_header Access-Control-Expose-Headers Content-Encoding; add_header Access-Control-Expose-Headers Content-Length; add_header Access-Control-Expose-Headers Content-Range; add_header accept_ranges bytes; client_max_body_size 512M; } but the error in the browser is persistent: Refused to get unsafe header "Accept-Ranges" i tried to add all those headers above after seeing this issue where the concerned op gave as his solution making the static pdf server return the headers Access-Control-Allow-Headers: Range Access-Control-Expose-Headers: Accept-Ranges, Content-Encoding, Content-Length, how do i achieve that in nginx and tornado?

上一篇:实用技巧:Linux操作系统Vim/Vi编程提速
下一篇:为学Android,我看了这些书

相关文章

相关评论