sse.js
sse.js copied to clipboard
Improving ottomata's approach to add optional response headers
This change allows to add response headers from SSE constructor like this:
var sse = new SSE(server, { headers: { 'Access-Control-Allow-Origin': '*', "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept, x-access-token", "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS" } });
I created other pull request but after study ottomata's approach I decided to use that. But when I was trying to use I realize that is not possible to use from SSE constructor. So I created another pull request.
Hey @rcarubbi I just wanted to say that this is a very useful pull request (which I'm going to fork and use in my work) and I hope it gets merged at some point. Thanks for creating it.
Hi,
I really appreciate your comment and I'm glad it was useful for you.
Regards
Em sex, 17 de mai de 2019 13:06, Alex [email protected] escreveu:
Hey @rcarubbi https://github.com/rcarubbi I just wanted to say that this is a very useful pull request (which I'm going to fork and use in my work) and I hope it gets merged at some point. Thanks for creating it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/einaros/sse.js/pull/29?email_source=notifications&email_token=AAITSFHCGWCQ6P4DI3L5HV3PV3JZJA5CNFSM4EWEFH2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVVFSMQ#issuecomment-493508914, or mute the thread https://github.com/notifications/unsubscribe-auth/AAITSFB76KTXHJ7CPHEGEEDPV3JZJANCNFSM4EWEFH2A .