upstream hanmo_backend {
    server hanmo-home:80;
}

server {
    listen 80;
    listen [::]:80;
    server_name www.hanmocnn.co.kr hanmocnn.co.kr;

    location / {
        proxy_pass http://hanmo_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
    }
}

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    
    location / {
        return 400;
    }
}
