Remember the Nginx 400 error once

Source: Internet
Author: User

There is a page under a non-CDN domain name and you need to request resources under the CDN domain name. So I set up the Nginx on the source station of the CDN.

Add_header ' access-control-allow-headers ' X-requested-with '
Add_header ' Access-control-allow-methods ' get,post,options
Add_header ' Access-control-allow-origin ' xx.com '

The page also requests a. Do interface, which is deployed under another domain name, and then uses the Proxy_pass http://xx.com;

The result is tragic, reported above the request,request header or cookie too large, the online solution is in

Client_header_buffer_size 16k;
Large_client_header_buffers 4 64k;

The final treatment method is to Proxy_pass Ip:port;

The specific reason for the moment is not to delve into, for the time being so deal with.

Remember the Nginx 400 error once

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.