{ "info": { "author": "Izhar Firdaus", "author_email": "kagesenshi.87@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "more.cors: CORS support for Morepath\n====================================\n\nThis package adds CORS support to Morepath.\n\n\nQuick start\n-----------\n\nInstall ``more.cors``:\n\n.. code-block:: console\n\n $ pip install -U more.cors\n\nExtend your App class from CORSApp:\n\n.. code-block:: python\n\n from more.cors import CORSApp\n\n\n class App(CORSApp):\n pass\n\nThis will add basic CORS support to your Morepath app.\n\n\nSettings\n--------\n\nmore.cors provides settings in the 'cors' section. Here are the defaults:\n\n.. code-block:: python\n\n @App.setting_section(section='cors')\n def cors_settings():\n return {\n 'allowed_verbs': ['GET', 'PUT', 'POST', 'PATCH', 'DELETE', 'OPTIONS'],\n 'allowed_origin': '*',\n 'expose_headers': ['Content-Type', 'Authorization'],\n 'allowed_headers': ['Content-Type', 'Authorization'],\n 'max_age': 60,\n 'allow_credentials': False\n }\n\nThe following settings are available:\n\nallowed_verbs\n A list of allowed HTTP request methods.\n\nallowed_origin\n A URI that may access the resource.\n For requests **without credentials**, \"*\" can be used as a wildcard,\n allowing any origin to access the resource.\n\nexpose_headers\n A list of HTTP headers which can be exposed as part of the response.\n\nallowed_headers\n A list of HTTP headers which can be used during the actual request.\n\nmax_age\n Maximum number of seconds the results of a preflight request can be cached.\n\nallow_credentials\n Boolean which indicates whether or not the actual request can be made using\n credentials.\n Credentials are cookies, authorization headers or TLS client certificates.\n\n\nSpecify CORS settings for a single view\n---------------------------------------\n\nmore.cors exposes the ``App.cors()`` class method.\nThis can be used to specify settings for a single view:\n\n.. code-block:: python\n\n App.cors(\n model=Root,\n view_name='view2',\n allowed_headers=['Cache-Control'],\n expose_headers=['Cookie'],\n allowed_origin='http://foo.com',\n allow_credentials=True,\n max_age=10\n )\n\nmodel\n Specifies the corresponding view model.\n\nview_name\n Is needed when you use a named view.\n\nallowed_headers, expose_headers, allowed_origin, allow_credentials, max_age\n The settings which can be specified. For details see Settings_.\n\n\nCHANGES\n=======\n\n0.2 (2018-06-11)\n----------------\n\n- Fix list of allowed verbs for failed (unauthorized) preflight (see `PR #4`_).\n\n.. _PR #4: https://github.com/morepath/more.cors/pull/4\n\n\n0.1 (2018-06-08)\n----------------\n\n- Initial public release\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/kagesenshi/more.cors", "keywords": "morepath CORS", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "more.cors", "package_url": "https://pypi.org/project/more.cors/", "platform": "", "project_url": "https://pypi.org/project/more.cors/", "project_urls": { "Homepage": "http://github.com/kagesenshi/more.cors" }, "release_url": "https://pypi.org/project/more.cors/0.2/", "requires_dist": [ "setuptools", "morepath", "pytest-cov; extra == 'coverage'", "flake8; extra == 'pep8'", "pep8-naming; extra == 'pep8'", "pytest; extra == 'test'", "pytest-remove-stale-bytecode; extra == 'test'", "webtest; extra == 'test'" ], "requires_python": "", "summary": "CORS support for Morepath", "version": "0.2" }, "last_serial": 3950927, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1effde53d9ec73672e64befa2dd7a77c", "sha256": "10663648de7278dfca303d7f759b1ba15fdad1758b4dd48dae6668f5f4ab7bca" }, "downloads": -1, "filename": "more.cors-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1effde53d9ec73672e64befa2dd7a77c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6326, "upload_time": "2018-06-08T14:45:00", "url": "https://files.pythonhosted.org/packages/68/5e/608906b52c026180043ac7cb15c8c15038cb3299027b79e684ae6da852ef/more.cors-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d5bdb0dbde514ebc0b0c3b1f2c37b4e8", "sha256": "50a7e4e6e34a8dde4987e337316d786e87f4fc607606564971bd7205eb549bc6" }, "downloads": -1, "filename": "more.cors-0.1.tar.gz", "has_sig": false, "md5_digest": "d5bdb0dbde514ebc0b0c3b1f2c37b4e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6224, "upload_time": "2018-06-08T14:45:01", "url": "https://files.pythonhosted.org/packages/0f/b6/ac9e9b10a35935cae19807cf1d22d1b2e19650b64e1592be4d16e1232bfb/more.cors-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "374e9a6710496ae95d36bf8bf22353a9", "sha256": "6f7870c327a6cc9e1205f79e34e6980b57aadf4239aec413fb6041852f5c34c4" }, "downloads": -1, "filename": "more.cors-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "374e9a6710496ae95d36bf8bf22353a9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6516, "upload_time": "2018-06-11T16:19:42", "url": "https://files.pythonhosted.org/packages/55/55/55c3cf5656b63863e9ce7d23bed6fef4bac2d6afc9a49777f40dd9d62bb6/more.cors-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "253bcd2673b26715d74697e9dcc604dd", "sha256": "15d734abb06c6a045f780f5ad915f8d626e74274a6080a7757a0849472550a06" }, "downloads": -1, "filename": "more.cors-0.2.tar.gz", "has_sig": false, "md5_digest": "253bcd2673b26715d74697e9dcc604dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6449, "upload_time": "2018-06-11T16:19:43", "url": "https://files.pythonhosted.org/packages/9c/80/54729d4c4f24431af6accafa39a6dc5abd7d6a72ed09a19f21b3bfc19075/more.cors-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "374e9a6710496ae95d36bf8bf22353a9", "sha256": "6f7870c327a6cc9e1205f79e34e6980b57aadf4239aec413fb6041852f5c34c4" }, "downloads": -1, "filename": "more.cors-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "374e9a6710496ae95d36bf8bf22353a9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6516, "upload_time": "2018-06-11T16:19:42", "url": "https://files.pythonhosted.org/packages/55/55/55c3cf5656b63863e9ce7d23bed6fef4bac2d6afc9a49777f40dd9d62bb6/more.cors-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "253bcd2673b26715d74697e9dcc604dd", "sha256": "15d734abb06c6a045f780f5ad915f8d626e74274a6080a7757a0849472550a06" }, "downloads": -1, "filename": "more.cors-0.2.tar.gz", "has_sig": false, "md5_digest": "253bcd2673b26715d74697e9dcc604dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6449, "upload_time": "2018-06-11T16:19:43", "url": "https://files.pythonhosted.org/packages/9c/80/54729d4c4f24431af6accafa39a6dc5abd7d6a72ed09a19f21b3bfc19075/more.cors-0.2.tar.gz" } ] }