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

Allow extra HTTP headers in BOSH and WebSockets. #2772

Closed
wants to merge 1 commit into from

Conversation

varnerac
Copy link
Contributor

@varnerac varnerac commented Jun 3, 2020

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
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
Copy link
Contributor Author

varnerac commented Oct 7, 2020

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