
    OwgA                        d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d d	lmZ  e ej"                  d
            ZddZddZy)    )annotationsN)Sequence)Any)urlsplit)settings)CheckMessage)Error)conf c                    g }t        t        j                  t              s|j	                  t        dd             t        t        j                  t              s|j	                  t        dd             t        t        j                  t              s|j	                  t        dd             t        t        j                  t              s|j	                  t        dd	             t        t        j                  t              rt        j                  d
k  r|j	                  t        dd             t        t        j                  t              s4t        t        d      rd}nd}|j	                  t        | dd             t        t        d      rd}nd}t        t        j                   t              s |j	                  t        | dd             nd}t        j                   D ]  }||v rt#        |      }|j$                  dk(  s|j&                  dk(  r7|j	                  t        dj)                  t+        |      |      dd             hdD ]H  }t-        ||      dk7  s|j	                  t        dj)                  t+        |      ||      d             J  t        t        d      rd}nd}t        t        j.                  t        t0        f      s+|j	                  t        d j)                  |      d!             t        t        j2                  t              s|j	                  t        d"d#             t        t        j4                  t        t0        f      s|j	                  t        d$d%             t        t        d&      r|j	                  t        d'd(             t        t        d)      r|j	                  t        d*d             |S )+Nz3CORS_ALLOW_HEADERS should be a sequence of strings.zcorsheaders.E001)idz3CORS_ALLOW_METHODS should be a sequence of strings.zcorsheaders.E002z(CORS_ALLOW_CREDENTIALS should be a bool.zcorsheaders.E003z,CORS_ALLOW_PRIVATE_NETWORK should be a bool.zcorsheaders.E015r   zJCORS_PREFLIGHT_MAX_AGE should be an integer greater than or equal to zero.zcorsheaders.E004CORS_ALLOW_ALL_ORIGINSCORS_ORIGIN_ALLOW_ALLz should be a bool.zcorsheaders.E005CORS_ALLOWED_ORIGINSCORS_ORIGIN_WHITELISTz! should be a sequence of strings.zcorsheaders.E006)nullzfile://r   z+Origin {} in {} is missing scheme or netloczcorsheaders.E013z:Add a scheme (e.g. https://) or netloc (e.g. example.com).)r   hint)pathqueryfragmentz"Origin {} in {} should not have {}zcorsheaders.E014CORS_ALLOWED_ORIGIN_REGEXESCORS_ORIGIN_REGEX_WHITELISTz;{} should be a sequence of strings and/or compiled regexes.zcorsheaders.E007z)CORS_EXPOSE_HEADERS should be a sequence.zcorsheaders.E008z,CORS_URLS_REGEX should be a string or regex.zcorsheaders.E009
CORS_MODELzKThe CORS_MODEL setting has been removed - see django-cors-headers' HISTORY.zcorsheaders.E012CORS_REPLACE_HTTPS_REFERERz]The CORS_REPLACE_HTTPS_REFERER setting has been removed - see django-cors-headers' CHANGELOG.)is_sequencer
   CORS_ALLOW_HEADERSstrappendr	   CORS_ALLOW_METHODS
isinstanceCORS_ALLOW_CREDENTIALSboolCORS_ALLOW_PRIVATE_NETWORKCORS_PREFLIGHT_MAX_AGEintr   hasattrr   r   r   schemenetlocformatreprgetattrr   re_typeCORS_EXPOSE_HEADERSCORS_URLS_REGEX)	kwargserrorsallow_all_aliasallowed_origins_aliasspecial_origin_valuesoriginparsedpartallowed_regexes_aliass	            I/var/www/horilla/myenv/lib/python3.12/site-packages/corsheaders/checks.pycheck_settingsr9      sg   !#Ft..4E%	
 t..4E%	
 d1148<AST	
 d55t<>%	
 t22C8&&** &	
 d11488566O5O"##56%	
 x/0 6 7t00#6())JK%	
!
 // 	F..f%F}}"fmmr&9ELL L*? ..	 : 	Dvt,2! D K K$(L2G!" $6		)	> x67 = =t77#wHMTT) &		
 t//5=BTU	
 d**S'N;@EWX	
 x&6 &	
 x56? &	
 M    c                P    t        | t              xr t        fd| D              S )Nc              3  6   K   | ]  }t        |        y w)N)r    ).0xtype_or_typess     r8   	<genexpr>zis_sequence.<locals>.<genexpr>   s      /)*
1m$/s   )r    r   all)thingr?   s    `r8   r   r      s+    eX& 3 /.3/ , r:   )r/   r   returnzlist[CheckMessage])rB   r   r?   z!type[Any] | tuple[type[Any], ...]rC   r"   )
__future__r   recollections.abcr   typingr   urllib.parser   django.confr   django.core.checksr   r	   corsheaders.confr
   typecompiler,   r9   r    r:   r8   <module>rO      s@    " 	 $  !   + $ !
zrzz"~
[|r:   