sse.js icon indicating copy to clipboard operation
sse.js copied to clipboard

Improving ottomata's approach to add optional response headers

Open rcarubbi opened this issue 7 years ago • 3 comments

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" } });

rcarubbi avatar Mar 19 '18 23:03 rcarubbi

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.

rcarubbi avatar Mar 19 '18 23:03 rcarubbi

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.

akodate avatar May 17 '19 16:05 akodate

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 .

rcarubbi avatar May 17 '19 16:05 rcarubbi