본문으로 건너뛰기
Skillpedia
보안75k · #3090

x-content-type

하는 일

이 스킬은 웹 서버가 nosniff 보안 헤더를 보내는지 확인합니다. 흔한 공격에 대비해 웹사이트를 강화하려는 개발자와 IT 담당자를 위한 스킬입니다.

사용하는 경우

  • ✓서버 응답에 X-Content-Type-Options 헤더가 없을 때.
  • ✓보안 체크리스트가 헤더 강화를 요구할 때.
  • ✓파일을 업로드한 뒤 방문자에게 다시 제공할 때.

스킬 링크

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-content-type/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-content-type/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“보안 점검에서 X-Content-Type-Options 헤더가 없다고 나옵니다. 추가해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 모든 응답에 대해 서버나 프레임워크 설정에 헤더를 추가합니다. 그다음 응답 헤더를 확인해 헤더가 있는지 검증합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Set X-Content-Type-Options: nosniff

Browsers that MIME-sniff can be tricked into executing malicious JavaScript uploaded as an image — even if the server sends Content-Type: image/png. nosniff forces the browser to honor the declared type.

Quick Reference

  • Set X-Content-Type-Options: nosniff on all responses — the only valid value is nosniff
  • Without this header, browsers may execute a JavaScript file disguised as an image if the server serves it with the wrong MIME type
  • This header is required by OWASP's security hardening checklist and the Fetch specification
  • Pair with correct Content-Type headers on all responses for defense in depth
  • Takes 5 minutes to configure and has no compatibility issues

Check

Check whether the server sends an X-Content-Type-Options: nosniff header on responses. Verify the header is present on HTML pages, scripts, stylesheets, and API responses.

Fix

Add X-Content-Type-Options: nosniff to all HTTP responses. Configure it at the web server level (Nginx, Apache) or in your application framework, and verify with curl -I https://example.com.

Explain

Explain what MIME type sniffing is, how it can be exploited to execute malicious files, and how X-Content-Type-Options: nosniff prevents this attack.

Code Review

Review server config, headers, forms, and integration points related to Set X-Content-Type-Options: nosniff. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/security/x-content-type

자주 묻는 질문

nosniff는 무엇을 하나요?

브라우저가 파일 형식을 추측하는 대신 선언된 형식을 신뢰하도록 하여, 해로운 파일을 실행할 가능성을 줄입니다.

호환성 문제가 있나요?

스킬에 따르면 이 헤더에는 알려진 호환성 문제가 없으며, 설정에 몇 분이면 충분합니다.

작동하는지 어떻게 확인하나요?

스킬은 curl 요청으로 응답 헤더를 확인할 것을 제안합니다.

상세 정보

작성자의 원본 설명

Use when auditing HTTP response headers on any web server or CDN for security hardening.

repo: thedaviddias/Front-End-Checklist

인기도

GitHub 스타
75k
순위
#3090
라이선스
MIT
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬