imrefazekas / connect-rest

Exceptionally featureful Restful web services middleware for connect node.js
MIT License
100 stars 29 forks source link

Setting header in options doesn't work #34

Closed jkinzel-r7 closed 8 years ago

jkinzel-r7 commented 8 years ago

Following the example here: https://github.com/imrefazekas/connect-rest/blob/2b79e73fc9f8971a34d6534460b3162bc0e09594/test/V2.js#L26

The headers that are passed don't actually get set. I attempted to set the Access-Control-Allow-Origin header on a server running on one port and access the end-points from a server running on another port. The response header is not set.

Could possibly be related to this commented out line: https://github.com/imrefazekas/connect-rest/blob/3d43c9f5126e2f81ab725ab273f15711181bb31e/lib/services/Performer.js#L60

imrefazekas commented 8 years ago

Correct, great catch! Thank you!

Fixed in the version 2.8.0 :)