isso-comments / isso-comments/isso
Document CORS handling (was: ISSO_CORS_ORIGIN not working as advertised)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.3k
- Forks
- 463
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 3
Description
According to the documentation, you can use an ISSO_CORS_ORIGIN environment variable to set e.g. wildcards for the Access-Control-Allow-Origin CORS header. However, it doesn't work in practice, because the code that uses it is as shown in this fragment:
def func(environ):
if 'ISSO_CORS_ORIGIN' in environ:
return environ['ISSO_CORS_ORIGIN']
However, the environ passed into func() is a restricted WSGI environment (request.environ) rather than the full process environment (os.environ). Therefore, the code should use os.environ in the above fragment rather than just environ. Or is there some other way that an ISSO_CORS_ORIGIN OS environment variable is supposed to find its way into a request.environ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the code containing func(environ) and compare its use of request.environ with the process environment described in the issue. Review the existing CORS documentation and determine whether the intended outcome is a code correction or clearer documentation; done means the documented ISSO_CORS_ORIGIN behavior matches the actual supported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100