Commit e46056bf authored by Břetislav Kábele's avatar Břetislav Kábele
Browse files

Add new file

parent 3d1fb5b3
Pipeline #7348 canceled with stages
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/;
events {
worker_connections 1024;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
client_max_body_size 500M;
server {
location / {
return 200 "Thank you for your report.\n";
limit_req_zone $binary_remote_addr zone=peripzone:10m rate=5r/m;
server {
listen *:80;
client_max_body_size 500M;
location = /upload {
# We just allow POST actions. Add PUT if you want to
# support PUT as well. (Not needed for CSP reports.)
limit_except POST {
deny all;
client_max_body_size 500M;
# Where to store the files on disk
client_body_temp_path /app/;
# Store the file on disk, and don't delete it, no matter
# what the proxy returns.
client_body_in_file_only on;
# Store at most 64k on disk. That should be sufficient
# for CSP reports.
client_body_buffer_size 64K;
# Give the client 10 seconds to upload.
client_body_timeout 10s;
# Do rate limiting
limit_req zone=peripzone burst=20 nodelay;
# Now proxy to the small internal server we started
# above, and don't pass the uploaded file to it.
proxy_set_body off;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment