%global _empty_manifest_terminate_build 0 Name: python-quart-cors Version: 0.6.0 Release: 1 Summary: A Quart extension to provide Cross Origin Resource Sharing, access control, support License: MIT URL: https://github.com/pgjones/quart-cors/ Source0: https://mirrors.nju.edu.cn/pypi/web/packages/06/bd/7e413c380484264f04ea390de82f5d78871010b445c2b08567682b9ce076/quart_cors-0.6.0.tar.gz BuildArch: noarch Requires: python3-quart Requires: python3-typing_extensions %description |Build Status| |pypi| |python| |license| Quart-CORS is an extension for `Quart `_ to enable and control `Cross Origin Resource Sharing `_, CORS (also known as access control). CORS is required to share resources in browsers due to the `Same Origin Policy `_ which prevents resources being used from a different origin. An origin in this case is defined as the scheme, host and port combined and a resource corresponds to a path. In practice the Same Origin Policy means that a browser visiting ``http://quart.com`` will prevent the response of ``GET http://api.com`` being read. It will also prevent requests such as ``POST http://api.com``. Note that CORS applies to browser initiated requests, non-browser clients such as ``requests`` are not subject to CORS restrictions. CORS allows a server to indicate to a browser that certain resources can be used, contrary to the Same Origin Policy. It does so via access-control headers that inform the browser how the resource can be used. For GET requests these headers are sent in the response. For non-GET requests the browser must ask the server for the access-control headers before sending the actual request, it does so via a preflight OPTIONS request. The Same Origin Policy does not apply to WebSockets, and hence there is no need for CORS. Instead the server alone is responsible for deciding if the WebSocket is allowed and it should do so by inspecting the WebSocket-request origin header. Simple (GET) requests should return CORS headers specifying the origins that are allowed to use the resource (response). This can be any origin, ``*`` (wildcard), or a list of specific origins. The response should also include a CORS header specifying whether response-credentials e.g. cookies can be used. Note that if credential sharing is allowed the allowed origins must be specific and not a wildcard. Preflight requests should return CORS headers specifying the origins allowed to use the resource, the methods and headers allowed to be sent in a request to the resource, whether response credentials can be used, and finally which response headers can be used. Note that certain actions are allowed in the Same Origin Policy such as embedding e.g. ```` and simple POSTs. For the purposes of this readme though these complications are ignored. %package -n python3-quart-cors Summary: A Quart extension to provide Cross Origin Resource Sharing, access control, support Provides: python-quart-cors BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-quart-cors |Build Status| |pypi| |python| |license| Quart-CORS is an extension for `Quart `_ to enable and control `Cross Origin Resource Sharing `_, CORS (also known as access control). CORS is required to share resources in browsers due to the `Same Origin Policy `_ which prevents resources being used from a different origin. An origin in this case is defined as the scheme, host and port combined and a resource corresponds to a path. In practice the Same Origin Policy means that a browser visiting ``http://quart.com`` will prevent the response of ``GET http://api.com`` being read. It will also prevent requests such as ``POST http://api.com``. Note that CORS applies to browser initiated requests, non-browser clients such as ``requests`` are not subject to CORS restrictions. CORS allows a server to indicate to a browser that certain resources can be used, contrary to the Same Origin Policy. It does so via access-control headers that inform the browser how the resource can be used. For GET requests these headers are sent in the response. For non-GET requests the browser must ask the server for the access-control headers before sending the actual request, it does so via a preflight OPTIONS request. The Same Origin Policy does not apply to WebSockets, and hence there is no need for CORS. Instead the server alone is responsible for deciding if the WebSocket is allowed and it should do so by inspecting the WebSocket-request origin header. Simple (GET) requests should return CORS headers specifying the origins that are allowed to use the resource (response). This can be any origin, ``*`` (wildcard), or a list of specific origins. The response should also include a CORS header specifying whether response-credentials e.g. cookies can be used. Note that if credential sharing is allowed the allowed origins must be specific and not a wildcard. Preflight requests should return CORS headers specifying the origins allowed to use the resource, the methods and headers allowed to be sent in a request to the resource, whether response credentials can be used, and finally which response headers can be used. Note that certain actions are allowed in the Same Origin Policy such as embedding e.g. ```` and simple POSTs. For the purposes of this readme though these complications are ignored. %package help Summary: Development documents and examples for quart-cors Provides: python3-quart-cors-doc %description help |Build Status| |pypi| |python| |license| Quart-CORS is an extension for `Quart `_ to enable and control `Cross Origin Resource Sharing `_, CORS (also known as access control). CORS is required to share resources in browsers due to the `Same Origin Policy `_ which prevents resources being used from a different origin. An origin in this case is defined as the scheme, host and port combined and a resource corresponds to a path. In practice the Same Origin Policy means that a browser visiting ``http://quart.com`` will prevent the response of ``GET http://api.com`` being read. It will also prevent requests such as ``POST http://api.com``. Note that CORS applies to browser initiated requests, non-browser clients such as ``requests`` are not subject to CORS restrictions. CORS allows a server to indicate to a browser that certain resources can be used, contrary to the Same Origin Policy. It does so via access-control headers that inform the browser how the resource can be used. For GET requests these headers are sent in the response. For non-GET requests the browser must ask the server for the access-control headers before sending the actual request, it does so via a preflight OPTIONS request. The Same Origin Policy does not apply to WebSockets, and hence there is no need for CORS. Instead the server alone is responsible for deciding if the WebSocket is allowed and it should do so by inspecting the WebSocket-request origin header. Simple (GET) requests should return CORS headers specifying the origins that are allowed to use the resource (response). This can be any origin, ``*`` (wildcard), or a list of specific origins. The response should also include a CORS header specifying whether response-credentials e.g. cookies can be used. Note that if credential sharing is allowed the allowed origins must be specific and not a wildcard. Preflight requests should return CORS headers specifying the origins allowed to use the resource, the methods and headers allowed to be sent in a request to the resource, whether response credentials can be used, and finally which response headers can be used. Note that certain actions are allowed in the Same Origin Policy such as embedding e.g. ```` and simple POSTs. For the purposes of this readme though these complications are ignored. %prep %autosetup -n quart-cors-0.6.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-quart-cors -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Mon Apr 10 2023 Python_Bot - 0.6.0-1 - Package Spec generated