Add CorsRegexEnvProcessor and corresponding tests
- Implemented CorsRegexEnvProcessor to build CORS origin regex from a comma-separated host list (ALLOWED_FRONTEND_HOSTS). - Added tests for CorsRegexEnvProcessor to validate regex generation and matching behavior. - Created JSON files for AST representation of the new classes and tests.
This commit is contained in:
+2
-2
@@ -22,8 +22,8 @@ JWT_PASSPHRASE=CHANGE_ME_STRONG_PASSPHRASE
|
||||
###< lexik/jwt-authentication-bundle ###
|
||||
|
||||
###> nelmio/cors-bundle ###
|
||||
# regex است (origin_regex: true). همهٔ دامنههای عمومی چند-شهری «<city>-nobat.ir» و پنل «clinic-pro.ir» را پوشش میدهد.
|
||||
CORS_ALLOW_ORIGIN='^https://([a-z0-9-]+\.)*([a-z0-9-]+-nobat\.ir|clinic-pro\.ir)$'
|
||||
# رجکسِ CORS در PHP از روی ALLOWED_FRONTEND_HOSTS ساخته میشود (CorsRegexEnvProcessor).
|
||||
# CORS_ALLOW_ORIGIN دیگر استفاده نمیشود — ست نکن.
|
||||
###< nelmio/cors-bundle ###
|
||||
|
||||
###> symfony/messenger ###
|
||||
|
||||
Reference in New Issue
Block a user