This provides for API requests to succeed, from the frontend
In production, CORS_ORIGINS can be controlled more finely, and would prevent requests from unauthorized origins
peas and love
A crucial part of allowing API access to external applciation is through CORS headers,
My API requests were returning a CORS error,
Request to add django-cors-headers to the requirements?
`pip install django-cors-headers`
Would provide the following additional settings in ./migratorapi/settings.py
```
INSTALLED_APPS = [
...
'corsheaders',
]
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
...
]
CORS_ORIGIN_ALLOW_ALL = True
#CORS_ORIGIN_WHITELIST = [
# '*',
# ]
```
This provides for API requests to succeed, from the frontend
In production, CORS_ORIGINS can be controlled more finely, and would prevent requests from unauthorized origins
peas and love
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A crucial part of allowing API access to external applciation is through CORS headers,
My API requests were returning a CORS error,
Request to add django-cors-headers to the requirements?
pip install django-cors-headersWould provide the following additional settings in ./migratorapi/settings.py
This provides for API requests to succeed, from the frontend
In production, CORS_ORIGINS can be controlled more finely, and would prevent requests from unauthorized origins
peas and love
Added in commit
1a85c99752