diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-10 08:31:31 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 08:31:31 +0000 |
| commit | f906b374a887351b96565f7ec989c7c516e508be (patch) | |
| tree | fbafc3490ad6808850070a9f94146b7b10ee260e | |
| parent | 84d22df37096e6eca2f955ce74ceff9b898d92e8 (diff) | |
automatic import of python-quart-cors
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-quart-cors.spec | 197 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 199 insertions, 0 deletions
@@ -0,0 +1 @@ +/quart_cors-0.6.0.tar.gz diff --git a/python-quart-cors.spec b/python-quart-cors.spec new file mode 100644 index 0000000..2ec3c01 --- /dev/null +++ b/python-quart-cors.spec @@ -0,0 +1,197 @@ +%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 +<https://github.com/pgjones/quart>`_ to enable and control `Cross +Origin Resource Sharing <http://www.w3.org/TR/cors/>`_, CORS (also +known as access control). +CORS is required to share resources in browsers due to the `Same +Origin Policy <https://en.wikipedia.org/wiki/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. ``<img src="http://api.com/img.gif">`` 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 +<https://github.com/pgjones/quart>`_ to enable and control `Cross +Origin Resource Sharing <http://www.w3.org/TR/cors/>`_, CORS (also +known as access control). +CORS is required to share resources in browsers due to the `Same +Origin Policy <https://en.wikipedia.org/wiki/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. ``<img src="http://api.com/img.gif">`` 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 +<https://github.com/pgjones/quart>`_ to enable and control `Cross +Origin Resource Sharing <http://www.w3.org/TR/cors/>`_, CORS (also +known as access control). +CORS is required to share resources in browsers due to the `Same +Origin Policy <https://en.wikipedia.org/wiki/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. ``<img src="http://api.com/img.gif">`` 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 <Python_Bot@openeuler.org> - 0.6.0-1 +- Package Spec generated @@ -0,0 +1 @@ +6083afefffa12b9cfddf391b14a86443 quart_cors-0.6.0.tar.gz |
