-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add with_headers() method to RemoteHttpPlugin (#15651)
# Objective - fulfill the needs presented in this issue, which requires the ability to set custom HTTP headers for responses in the Bevy Remote Protocol server. #15551 ## Solution - Created a `Headers` struct to store custom HTTP headers as key-value pairs. - Added a `headers` field to the `RemoteHttpPlugin` struct. - Implemented a `with_headers` method in `RemoteHttpPlugin` to allow users to set custom headers. - Passed the headers into the processing chain. ## Testing - I added cors_headers in example/remote/server.rs and tested it with a static html [file](https://github.com/spacemen0/bevy/blob/test_file/test.html) ---
- Loading branch information
Showing
1 changed file
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters