{ "info": { "author": "Prasanth Nair", "author_email": "prasanth.n@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django CORS\n===========\n\nThe package ``dcors`` is a Django middleware for enabling Cross-Origin Resource\nSharing (CORS).\n\nInstall the module using::\n\n pip install django-dcors\n\nCode is available at https://github.com/prasanthn/django-dcors .\n\nValues specified in the Django settings module are used to set appropriate\nheaders in HTTP responses. These headers are added to all responses.\n\nPre-flight requests, i.e., OPTIONS requests that have the\nAccess-Control-Request-Method header, are returned with an empty response\ncontaining all the headers mentioned below.\n\nTake this behaviour into account when adding this middleware to the\nMIDDLEWARE_CLASSES list in the settings module.\n\nAdding headers to all responses is useful since not all requests are\n\"pre-flighted\". For example a \"simple\" credentialed GET request is not\n\"pre-flighted\", but the response must have Access-Control-Allow-Credentials set\nto \"true\" for the response to be available to the client script.\n\n::\n\n Setting Value Respone header\n\n CORS_ALLOW_ORIGIN string Access-Control-Allow-Origin\n CORS_ALLOW_METHODS list Access-Control-Allow-Methods\n CORS_ALLOW_HEADERS list Access-Control-Allow-Headers\n CORS_ALLOW_CREDENTIALS \"true\" or \"false\" Access-Control-Allow-Credentials\n CORS_EXPOSE_HEADERS list Access-Control-Expose-Headers\n CORS_MAX_AGE seconds Access-Control-Max-Age\n CORS_ALLOW_ALL_ORIGIN \n CORS_ALLOW_ALL_HEADERS \n\nIf the setting CORS_ALLOW_ALL_ORIGIN is present, containing any value, then the\nAccess-Control-Allow-Origin response header is set to the value of the Origin\nheader in the request. This is a shortcut for allowing CORS for all domains.\n\nIf the setting CORS_ALLOW_ALL_HEADERS is present, containing any value, then the\nAccess-Control-Allow-Headers response header is set it the value of the Access-\nControl-Request-Headers header in the request. This is a shortcut for allowing\nclients to send any header with a CORS request.\n\nBy default none of the above values are set, and hence the response will contain\nempty values for the corresponding header. Note that the headers will be present\nin the response, but the value of each will be an empty string.\n\nThis middleware only adds appropriate headers to responses, and doesn't prevent\naccess based on header values in the request. A web browser will not allow\nJavaScript to issue requests and access responses that don't conform to the CORS\nstandard. The browser determines the allowed access points using the headers in\nthe response.\n\nSee https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS for more\ninformation on CORS. Web browsers that support CORS can be found at\nhttp://caniuse.com/#search=cors .\n\nTests are present in dcors/tests.py, and have been tested with Django 1.4.5 and\n1.5.1 in Python 2.7.3 .", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/prasanthn/django-dcors", "keywords": "django,CORS", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-dcors", "package_url": "https://pypi.org/project/django-dcors/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-dcors/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/prasanthn/django-dcors" }, "release_url": "https://pypi.org/project/django-dcors/0.1/", "requires_dist": null, "requires_python": null, "summary": "Django middleware for adding CORS HTTP headers.", "version": "0.1" }, "last_serial": 789441, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e90a5e89785a96d26ac939cede78dcb3", "sha256": "b6a10e5db97d16d1cf125baab52ae6a75b5d066ab94835f2119ba3924ed6c277" }, "downloads": -1, "filename": "django-dcors-0.1.zip", "has_sig": false, "md5_digest": "e90a5e89785a96d26ac939cede78dcb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10539, "upload_time": "2013-05-12T08:35:51", "url": "https://files.pythonhosted.org/packages/3c/1f/1d16f76f63dfac6a72b226614e74bd2d03ad2ed49d150d915bd252e5ad35/django-dcors-0.1.zip" } ], "0.1alpha": [ { "comment_text": "", "digests": { "md5": "79e3d3be683515be5044c5aba0c7ca0e", "sha256": "8c437de9c5a333faf0ac02469e7a9707ab90b27c2d7c8e5d00b2c071c836757b" }, "downloads": -1, "filename": "django-dcors-0.1alpha.zip", "has_sig": false, "md5_digest": "79e3d3be683515be5044c5aba0c7ca0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10191, "upload_time": "2013-05-12T08:18:56", "url": "https://files.pythonhosted.org/packages/96/65/d4d3599d533bcc61b36358a3f7be830a9253ff730e7da7352210bf6f2971/django-dcors-0.1alpha.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e90a5e89785a96d26ac939cede78dcb3", "sha256": "b6a10e5db97d16d1cf125baab52ae6a75b5d066ab94835f2119ba3924ed6c277" }, "downloads": -1, "filename": "django-dcors-0.1.zip", "has_sig": false, "md5_digest": "e90a5e89785a96d26ac939cede78dcb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10539, "upload_time": "2013-05-12T08:35:51", "url": "https://files.pythonhosted.org/packages/3c/1f/1d16f76f63dfac6a72b226614e74bd2d03ad2ed49d150d915bd252e5ad35/django-dcors-0.1.zip" } ] }