
    wdf                     n    d dl mZ d dl mZ d dlmZ d dlmZ  G d de          Z G d de          Zd	S )
   )dump_header)parse_set_header)environ_property)header_propertyc                   b    e Zd ZdZ edd          Z eded          Z edd	          Zd
S )CORSRequestMixinzA mixin for :class:`~werkzeug.wrappers.BaseRequest` subclasses
    that adds descriptors for Cross Origin Resource Sharing (CORS)
    headers.

    .. versionadded:: 1.0
    HTTP_ORIGINzThe host that the request originated from. Set :attr:`~CORSResponseMixin.access_control_allow_origin` on the response to indicate which origins are allowed.doc#HTTP_ACCESS_CONTROL_REQUEST_HEADERSzSent with a preflight request to indicate which headers will be sent with the cross origin request. Set :attr:`~CORSResponseMixin.access_control_allow_headers` on the response to indicate which headers are allowed.)	load_funcr   "HTTP_ACCESS_CONTROL_REQUEST_METHODzSent with a preflight request to indicate which method will be used for the cross origin request. Set :attr:`~CORSResponseMixin.access_control_allow_methods` on the response to indicate which methods are allowed.N)	__name__
__module____qualname____doc__r   originr   access_control_request_headersaccess_control_request_method     [/var/www/book.euthymeo.com/html/venv/lib/python3.11/site-packages/werkzeug/wrappers/cors.pyr   r      s          C  F &6%5-"F		& 	& 	&" %5$4,F% % %!!!r   r   c                       e Zd ZdZed             Zej        d             Z edee	d          Z
 edee	d          Z ed	d
          Z edee	d          Z edeed          ZdS )CORSResponseMixinzA mixin for :class:`~werkzeug.wrappers.BaseResponse` subclasses
    that adds descriptors for Cross Origin Resource Sharing (CORS)
    headers.

    .. versionadded:: 1.0
    c                     d| j         v S )zWhether credentials can be shared by the browser to
        JavaScript code. As part of the preflight request it indicates
        whether credentials can be used on the cross origin request.
         Access-Control-Allow-Credentials)headers)selfs    r    access_control_allow_credentialsz2CORSResponseMixin.access_control_allow_credentials6   s     2T\AAr   c                 \    |du rd| j         d<   d S | j                             dd            d S )NTtruer   )r   pop)r   values     r   r   z2CORSResponseMixin.access_control_allow_credentials>   s=    D==?EDL;<<<L?FFFFFr   zAccess-Control-Allow-Headersz8Which headers can be sent with the cross origin request.)r   	dump_funcr   zAccess-Control-Allow-Methodsz7Which methods can be used for the cross origin request.zAccess-Control-Allow-OriginzEThe origin or '*' for any origin that may make cross origin requests.r
   zAccess-Control-Expose-Headersz>Which headers can be shared by the browser to JavaScript code.zAccess-Control-Max-AgezIThe maximum age in seconds the access control settings can be cached for.N)r   r   r   r   propertyr   setterr   r   r   access_control_allow_headersaccess_control_allow_methodsaccess_control_allow_originaccess_control_expose_headersintstraccess_control_max_ager   r   r   r   r   .   s         B B XB &,G G -,G $3?&"F	$ $ $  $3?&"E	$ $ $  #2/%S# # #
 %4O'"L	% % %! -_ W	  r   r   N)	httpr   r   utilsr   r   objectr   r   r   r   r   <module>r1      s          # # # # # # $ $ $ $ $ $ # # # # # #$ $ $ $ $v $ $ $N6 6 6 6 6 6 6 6 6 6r   