Add CORS header configuration for BRP RemoteHttpPlugin
#15551
Labels
A-Dev-Tools
Tools used to debug Bevy applications.
C-Feature
A new feature, making something new possible
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
What problem does this solve or what need does it fill?
To fully utilize the BRP functionality using web hosted tools, we need a way to set the
Access-Control-Allow-Origin
header in the responses.Without being able to set that header, we would have to resort to reverse proxies to get around the issue.
What solution would you like?
Add a
with_cors
method toRemoteHttpPlugin
. The method would ensure thatAccess-Control-Allow-Origin
is added to all responses, with the origin provided as a param.What alternative(s) have you considered?
We could add the option to set any headers during setup. But I don't know if that is really needed.
Additional context
See bevy_react_inspector which currently needs a reverse proxy to function.
The text was updated successfully, but these errors were encountered: