Now.js Framework Documentation

Now.js Framework Documentation

SecurityConventions

EN 04 Sep 2026 01:40

SecurityConventions

SecurityConventions - Convention-based security rules management system

Generated from source on 2026-08-21. Descriptions come from JSDoc in the file.
Re-run docs_scaffold when the code changes; hand edits are lost on regeneration

Source

  • File: Now/js/SecurityConventions.js (535 lines)
  • Form: object literal (singleton)

Public methods (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