Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

es/v2: Remove "Common errors" #219

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,18 @@ response headers. You can set cookies with the `Set-Cookie` response header—fo
ctx.responseHeader.append("Set-Cookie", "foo=bar; Max=Age=120")
```

### Access to fetch from origin has been blocked by CORS policy

When a web page requests a resource from another origin, the restrictions for Cross-Origin Resource Sharing apply.
The server has to allow the client to send and receive protocol-specific headers. We show how to set up a server in the [CORS documentation](./cors.md).

One specific gotcha to be aware of involves a new header `Connect-Protocol-Version`. With the [v0.6.0 release](https://github.com/connectrpc/connect-es/releases/tag/v0.6.0)
of `@connectrpc/connect-web`, this header was added to all requests sent via the library. As a result, Connect clients
that were working prior may start experiencing CORS errors upon upgrading to `v0.6.0`. Note that this also only affects
Connect traffic. gRPC-Web traffic is unaffected.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this is even worth mentioning any more. We moved to @connectrpc after v0.13.0 and this predates even that by at least 7 releases. I'm sure people are still downloading this out in the wild, but is it worth the extra FAQ noise?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. There are only ~250 weekly downloads for < v0.6.0, and we link to the CORS docs from other FAQs. Updated.


For more information on the `Connect-Protocol-Version` header, see [this PR](https://github.com/connectrpc/connect-go/pull/416).

## Deployment

### How do I handle Authorization Bearer headers through middleware/interceptors?
Expand Down
31 changes: 0 additions & 31 deletions docs/web/common-errors.md

This file was deleted.