Skip to content

Allow extra HTTP headers in BOSH and WebSockets.#2772

Closed
varnerac wants to merge 1 commit into
esl:masterfrom
varnerac:websocket_cors_header
Closed

Allow extra HTTP headers in BOSH and WebSockets.#2772
varnerac wants to merge 1 commit into
esl:masterfrom
varnerac:websocket_cors_header

Conversation

@varnerac

@varnerac varnerac commented Jun 3, 2020

Copy link
Copy Markdown
Contributor

This is a WIP PR

Proposed changes include:

  • Allowing extra headers for BOSH and WebSockets

This isn't ready yet. I just wanted to test the waters and see if you had an appetite for a patch like this. We want the ability to add CORS headers and security headers like HSTS to the BOSH and WebSockets endpoints.

@michalwski

Copy link
Copy Markdown
Contributor

Hi @varnerac, thanks for the patch. There are appetite and need for the CORS headers, there is even another PR #1195 where the headers are always added in case of BOSH connection. I think making them configurable would be a more flexible solution.

When it comes to your changes, they don't integrate well with cowboy yet. All the tests connecting users over BOSH or WS failed. You can try it locally by running the following commands:

tools/test-runner.sh --skip-small-tests --skip-cover --preset internal_mnesia -- ws

or

tools/test-runner.sh --skip-small-tests --skip-cover --preset internal_mnesia -- bosh

More on the test-runner.sh the script you can find in the help provided by the tool and https://mongooseim.readthedocs.io/en/latest/developers-guide/Testing-MongooseIM/

@varnerac

varnerac commented Oct 7, 2020

Copy link
Copy Markdown
Contributor Author

I'll tackle this in another PR

@varnerac varnerac closed this Oct 7, 2020
@varnerac
varnerac deleted the websocket_cors_header branch October 8, 2020 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants