simonw / datasette-cors

Datasette plugin for configuring CORS headers
Apache License 2.0
11 stars 1 forks source link

Add support for headers, methods and max_age - added in asgi-cors 1.0 #5

Closed simonw closed 3 months ago

simonw commented 3 months ago

See https://github.com/simonw/asgi-cors/releases/tag/1.0

simonw commented 3 months ago

Got llm-claude-3 with Claude 3 Opus and files-to-prompt to do all of the work for me:

files-to-prompt ../asgi-cors/asgi_cors.py datasette_cors.py | llm -m opus -s \
  'Output a new datasette_cors.py plugin that adds headers and methods and max_age config options'

files-to-prompt test_datasette_cors.py | llm -c \
  'Update these tests to exercise the new options as well'

cat README.md | llm -c \
  'Update the README to document the new config options'

Transcript: https://gist.github.com/simonw/5e379cc3ed610caf8dfbdfe25b19874a

simonw commented 3 months ago

I wrote about this here: https://simonwillison.net/2024/Apr/8/files-to-prompt/#real-work