Skip to content

docs: simplify code examples with header comments#386

Merged
UlisesGascon merged 2 commits intoexpressjs:masterfrom
jonchurch:docs/add-headers-to-examples
Jan 13, 2026
Merged

docs: simplify code examples with header comments#386
UlisesGascon merged 2 commits intoexpressjs:masterfrom
jonchurch:docs/add-headers-to-examples

Conversation

@jonchurch
Copy link
Member

@jonchurch jonchurch commented Jan 12, 2026

This PR is part of an attempt to reduce confusion in the docs #384

The docs should absolutely show what headers are being added, as that is the whole point of this library

idk yet if I want the response messages to refer to what "will happen" in the browser. Split between the examples being mechanical (what does this library actually add/do) vs functional (what is the effect in the browser). So for now just simplified the response messages

- Add comments showing which CORS headers get set
- Simplify response bodies to 'Hello'
- Simplify console.log messages
@UlisesGascon UlisesGascon self-assigned this Jan 13, 2026
@UlisesGascon UlisesGascon merged commit bbf62a5 into expressjs:master Jan 13, 2026
32 checks passed
This was referenced Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants