---
title: "HTTP Security Header Checker | iamthana"
description: "ตรวจ HTTP Security Headers ของ URL หรือ header ที่วางเอง พร้อมค่าที่ OWASP แนะนำให้ตั้ง"
canonical_url: "https://iamthana.com/tools/http-security-header"
meta:
  "og:description": "ตรวจ HTTP Security Headers ของ URL หรือ header ที่วางเอง พร้อมค่าที่ OWASP แนะนำให้ตั้ง"
  "og:image": "https://iamthana.com/_og/s/o_36d6b4c7a0773b0b.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "HTTP Security Header Checker | iamthana"
  "twitter:image": "https://iamthana.com/_og/s/o_36d6b4c7a0773b0b.png"
---

> Index of every page on this site: [llms.txt](https://iamthana.com/llms.txt)

# **HTTP Security Header Checker**

ตรวจ HTTP Security Headers ของ URL หรือ header ที่วางเอง พร้อมค่าที่ OWASP แนะนำให้ตั้ง

ใส่ URL หรือชื่อเว็บไซต์ในช่องรับข้อมูล แล้วกดตรวจสอบ ผลจะขึ้นที่นี่

## **ผลนี้บอกอะไรได้บ้าง**

เครื่องมือนี้อ่าน response header ของ URL เดียว ณ ตอนที่กดตรวจ หน้าอื่นในเว็บเดียวกันอาจส่ง header ต่างออกไป ส่วนโค้ดของเว็บและช่องโหว่ในแอปอยู่นอกขอบเขตของการตรวจนี้

ตัวเลขบนแถบด้านบนนับ 4 รายการหลัก คือ HSTS, Content-Security-Policy, การกันฝังหน้าในเฟรม (X-Frame-Options หรือ frame-ancestors) และ X-Content-Type-Options ว่ามีกี่รายการที่ตั้งค่าแล้วโดยไม่มีจุดที่ควรตรวจ ตัวเลขนี้ไม่ได้วัดความปลอดภัยโดยรวมของเว็บ

ป้าย "ควรตรวจ" ชี้ค่าที่แหล่งอ้างอิงแนะนำให้เลี่ยง หรือรูปแบบที่เบราว์เซอร์ไม่ใช้ผล เป็นจุดให้ไปดูต่อว่าตั้งใจหรือเปล่า ป้าย "ไม่พบ" หมายถึงไม่มี header นั้นใน response

โหมดตรวจจาก URL ให้เซิร์ฟเวอร์ของเว็บนี้เป็นฝ่ายเรียก URL จึงตรวจ localhost, ที่อยู่ IP ภายในเครือข่าย (เช่น 127.x, 10.x, 192.168.x) และ URL ที่ระบุพอร์ตไม่ได้ กรณีเหล่านี้ให้รัน curl -I เองแล้ววางผลในโหมดวาง header

## **ที่มาของเกณฑ์**

ตัวอย่างค่าในแต่ละแถวมาจาก OWASP HTTP Headers Cheat Sheet ส่วนวิธีอ่านค่ามาจาก MDN และ RFC 6797 ใช้เป็นจุดเริ่มต้นแล้วปรับตามเว็บของคุณ

HSTS: ขั้นต่ำของ preload list คือ max-age 31536000 วินาที (1 ปี) พร้อม includeSubDomains และ preload hstspreload.org ระบุว่าการอยู่ใน list ถอนออกง่าย ๆ ไม่ได้ และตาม RFC 6797 เบราว์เซอร์ต้องไม่สนใจ header นี้ที่มาทาง HTTP

การกันฝังหน้า: X-Frame-Options รับเฉพาะ DENY กับ SAMEORIGIN ส่วน ALLOW-FROM เลิกใช้แล้ว MDN แนะนำ frame-ancestors ใน CSP ซึ่งไม่ย้อนไปใช้ค่าจาก default-src หน้าที่ตั้ง default-src 'none' จึงยังถูกฝังได้ถ้าไม่มี frame-ancestors

CSP: 'unsafe-inline' จะถูกเมินเมื่อ directive เดียวกันมี nonce หรือ hash ส่วน 'unsafe-eval' ยังทำงานอยู่ ตัวตรวจจึงนับ 'unsafe-inline' เป็นจุดที่ควรตรวจเฉพาะเมื่อไม่มี nonce หรือ hash นโยบายแบบ Report-Only รายงานการละเมิดแต่ไม่บังคับใช้ จึงไม่นับเป็นการป้องกัน

Header เก่า: X-XSS-Protection เลิกใช้แล้ว MDN แนะนำ CSP แทน ส่วน Referrer-Policy ถ้าไม่ตั้ง เบราว์เซอร์ใช้ strict-origin-when-cross-origin เป็นค่าเริ่มต้น (MDN)

- [OWASP HTTP Headers](https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html)
- [MDN Strict-Transport-Security](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security)
- [RFC 6797](https://www.rfc-editor.org/rfc/rfc6797)
- [hstspreload.org](https://hstspreload.org/)

## **เครื่องมืออื่น ๆ**

- [Security

  $2b$12$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy<h3>**BCrypt Hash Generator**</h3>

  สร้าง bcrypt hash จากรหัสผ่าน และตรวจว่ารหัสผ่านตรงกับ hash หรือไม่](https://iamthana.com/tools/bcrypt-generator)
- [Security

  eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV\_adQssw5c<h3>**JWT Decoder**</h3>

  ถอดรหัส JSON Web Token เพื่อดู Header, Payload และเวลาหมดอายุ โดยไม่ตรวจลายเซ็น](https://iamthana.com/tools/jwt-decoder)
- [Security

  k7#Qm2-vR9!xLp4w

  length 16<h3>**Password Generator**</h3>

  สร้างรหัสผ่านแบบสุ่มด้วย crypto.getRandomValues เลือกความยาวและชนิดตัวอักษรได้ พร้อมแสดงเอนโทรปีเป็นบิต](https://iamthana.com/tools/password-generator)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://iamthana.com/#website","@type":"WebSite","inLanguage":"th-TH","name":"iamthana","url":"https://iamthana.com/","publisher":{"@id":"https://iamthana.com/#identity"},"workTranslation":[]},{"@id":"https://iamthana.com/tools/http-security-header#webpage","@type":"WebPage","description":"ตรวจ HTTP Security Headers ของ URL หรือ header ที่วางเอง พร้อมค่าที่ OWASP แนะนำให้ตั้ง","name":"HTTP Security Header Checker","url":"https://iamthana.com/tools/http-security-header","isPartOf":{"@id":"https://iamthana.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://iamthana.com/tools/http-security-header"]}]},{"@id":"https://iamthana.com/#identity","@type":"Person","name":"iamthana","url":"https://iamthana.com","sameAs":["https://github.com/iamthana"]}]}
```

## Sitemap

See the full [sitemap](https://iamthana.com/sitemap.md) for all pages.
