wasm 파일에 gzip을 적용하는게 목표 타입 추가
cd /etc/nginx vi mime.types application/xspf+xml xspf; application/zip zip; application/wasm wasm; |
nginx.conf http 부분에서 내용 변환
cd /etc/nginx vi nginx.conf ## # Gzip Settings ## gzip on; gzip_disable "msie6"; gzip_comp_level 6; gzip_min_length 500; gzip_buffers 16 8k; gzip_proxied any; gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/rss+xml application/wasm image/svg+xml image/png; |
nginx 재부팅
nginx -t service nginx restart |
gzip on; gzip_static on; gzip_disable "msie6"; # 자동으로 IE6, 5.5를 감지해서 disable한다. # gzip_disable "MSIE [1-6]\.(?!.*SV1)"; # nginx 0.7 이하에서만 gzip_types application/x-javascript application/javascript application/xml text/javascript application/json text/json text/css text/plain application/xhtml+xml application/rss+xml application/wasm ; |
개발자 도구에서 동작 확인
'시스템' 카테고리의 다른 글
s3 권한이 없는 경우 (0) | 2022.05.17 |
---|---|
프로메테우스 모니터링 (0) | 2022.03.30 |
nginx/1.18.0 (Ubuntu20.04) brotli (0) | 2022.01.11 |
Gitlab CI react app 배포 (0) | 2021.12.31 |
AWS Amplify 설치 (0) | 2021.12.28 |