Skip to content

Commit

Permalink
fix : image nginx error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oznchex committed Jul 24, 2024
1 parent 6c46103 commit 6585973
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion .platform/conf.d/client_max_body_size.conf

This file was deleted.

6 changes: 6 additions & 0 deletions .platform/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

client_max_body_size 5M;

types_hash_max_size 2048;
server_names_hash_bucket_size 64;

Expand All @@ -36,6 +38,8 @@ http {
listen 80 default_server;
listen [::]:80 default_server;

client_max_body_size 5M;

location / {
proxy_pass http://springboot;
# CORS 관련 헤더 추가
Expand All @@ -49,6 +53,8 @@ http {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

client_max_body_size 5M;
}

access_log /var/log/nginx/access.log main;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class ImageService {
private final S3Uploader s3Uploader;
private final ApplicationEventPublisher publisher;


public MiniProfileImageResponse save(final MultipartFile miniProfileImageFile) {
validateSizeOfImage(miniProfileImageFile);
final ImageFile imageFile = new ImageFile(miniProfileImageFile);
Expand Down

0 comments on commit 6585973

Please sign in to comment.