3scale / APIcast

3scale API Gateway
Apache License 2.0
305 stars 171 forks source link

[THREESCALE-10164] Add support to set large_client_header_buffers directive #1446

Closed tkan145 closed 7 months ago

tkan145 commented 8 months ago

What

Fixes: https://issues.redhat.com/browse/THREESCALE-10164

Verification Steps

cat <<EOF >apicast-config.json
{
    "services": [
        {
            "id": "1",
            "backend_version": "1",
            "proxy": {
                "hosts": [
                    "one"
                ],
                "api_backend": "https://echo-api.3scale.net:443",
                "backend": {
                    "endpoint": "http://127.0.0.1:8081",
                    "host": "backend"
                },
                "policy_chain": [
                    {
                        "name": "apicast.policy.apicast"
                    }
                ],
                "proxy_rules": [
                    {
                        "http_method": "GET",
                        "pattern": "/",
                        "metric_system_name": "hits",
                        "delta": 1,
                        "parameters": [],
                        "querystring_parameters": {}
                    }
                ]
            }
        }
    ]
} 
EOF

The response should be HTTP/1.1 400 Bad Request

HTTP/1.1 400 Bad Request                                          
Server: openresty                                                 
Date: Thu, 08 Feb 2024 06:49:26 GMT                               
Content-Type: text/html                                           
Content-Length: 230                                               
Connection: close                                                 

<html>                                                            
<head><title>400 Request Header Or Cookie Too Large</title></head>
<body>                                                            
<center><h1>400 Bad Request</h1></center>                         
<center>Request Header Or Cookie Too Large</center>               
<hr><center>openresty</center>                                    
</body>                                                           
</html>                                                           

The response should be HTTP/1.1 200 OK

tkan145 commented 8 months ago

I kindly requested review from @3scale/documentation team.

For some reason the test keeps failing in this PR :disappointed: , hopefully after I address the feedback from the docs team and make a new commit the test will work

tkan145 commented 7 months ago

Conflict resolved

eguzki commented 7 months ago

@dfennessy your approval is needed as you requested changes