Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Parser limit client body size #22

Open
ThreeDP opened this issue May 19, 2024 · 0 comments
Open

FIX: Parser limit client body size #22

ThreeDP opened this issue May 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ThreeDP
Copy link
Owner

ThreeDP commented May 19, 2024

Como é a configuração do limit_client_body_size:

  • Se definido no server: Será o default para todas as locations.
  • Se definido no location: sobrescreve o default para aquela location especifica.
  • Em seu valor temos um valor inteiro e uma letra que representa a unidade em bytes que deve ser multiplicada.
  • É a quantidade de dados que pode ser enviada no payload http.

Em caso de uma configuração assim:

server {
     server_name amigo.com;
     listen 8000;

     limit_client_body_size 8M;

     location / {
        limit_client_body_size 2M;
     }

     location /static/images {
        limit_client_body_size 1G;
     }

     location /static {
        limit_client_body_size 2K;
     }

     location /img {

     }
}
  • O default é de um payload de 8.388.608 bytes.
  • O location / é de um payload de 2.097.152 bytes.
  • O location /static/images é de um payload de 1.073.741.824 bytes.
  • O location /staic é de um payload de 2048 bytes.
  • O location /img recebe o payload default do server 8.388.608 bytes.
@ThreeDP ThreeDP added the bug Something isn't working label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant