Now.js Framework Documentation

Now.js Framework Documentation

SecurityConventions

TH 04 Sep 2026 01:40

SecurityConventions

SecurityConventions - Convention-based security rules management system

หน้านี้สร้างจากซอร์สโดยตรงเมื่อ 2026-08-21 คำอธิบายมาจาก JSDoc ในไฟล์
รันซ้ำได้ด้วย docs_scaffold เมื่อโค้ดเปลี่ยน อย่าแก้ด้วยมือถ้าตั้งใจให้ generate ต่อ

ที่มา

  • ไฟล์: Now/js/SecurityConventions.js (535 บรรทัด)
  • รูปแบบ: object literal (singleton)

เมธอดสาธารณะ (13)

applyConventions(path, existingMetadata = {}, customConventions = {})

Apply conventions to route path

calculateSpecificity(pattern)

Calculate pattern specificity for proper ordering

checkSecurityIssues(routeInfo)

Check for potential security issues

findMatchingConventions(path, conventions)

Find all matching conventions for a path

findSimilarPatterns(pattern, conventions)

Find similar patterns that might conflict

generateSecurityReport(routes, conventions = {})

Generate security report for all routes

hasCustomSecurity(metadata)

Check if route has custom security settings

isValidPattern(pattern)

Check if pattern is valid

matchesPattern(path, pattern)

Check if path matches pattern

mergeConvention(target, convention, specificity)

Merge convention into existing metadata

patternsOverlap(pattern1, pattern2)

Check if two patterns overlap

suggestConventions(path)

Get convention suggestions for a path

validateConventions(conventions)

Validate convention configuration