Skip to content

Commit

Permalink
bugfix for CORS support
Browse files Browse the repository at this point in the history
  • Loading branch information
wshaddix committed May 9, 2018
1 parent 1035d45 commit 2d87843
Show file tree
Hide file tree
Showing 30 changed files with 1,819 additions and 1,756 deletions.
576 changes: 288 additions & 288 deletions .gitignore

Large diffs are not rendered by default.

77 changes: 42 additions & 35 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
### Changes

**0.9.1**

* now honoring the `NatsMessage.responseStatusCode` if it has been set by the microservice handling the request.

* if the `NatsMessage.errorMessage` property is set then the http-nats-proxy will return a status code 500 with a formatted error message to the api client.

* now returning the `NatsMessage.response` as the http response.

**1.0.0**

* added pipeline feature and refactored the solution to have working examples of logging, metrics, authentiation and trace header injection.

**1.0.1**

* added logging to the request handler so that it's obvious when traffic is coming into the http-nats-proxy


**1.0.2**

* now checking the state of the NATS connection to ensure it's in a `CONNECTED` state before trying to send messages.
* reduced the `PingInterval` of the NATS connection to help with reconnections when the NATS server becomes unavailable
* now logging when NATS connection events happen

**1.0.3**

* changing the format of the message that the proxy sends to microservices and the pipeline steps to make them more intuitive. Specifically changed `Cookies, ExtendedProperties, QueryParams, RequestHeaders` and `ResponseHeaders` from name/value collections to `Dictionary<string, object>` so they serialize into a more intuitive json string.

**1.0.4**

* changed the call timings from a tuple to a custom class because tuples do not serialize to json with readable property names (see https://github.com/JamesNK/Newtonsoft.Json/issues/1230)
* renamed property `Body` to `RequestBody` on the `NatsMessage`
* renamed property `Response` to `ResponseBody` on the `NatsMessage`
* introduced the concept of Observers to the request pipeline (see README for details)
# Changes

## 0.9.1

* now honoring the `NatsMessage.responseStatusCode` if it has been set by the microservice handling the request.

* if the `NatsMessage.errorMessage` property is set then the http-nats-proxy will return a status code 500 with a formatted error message to the api client.

* now returning the `NatsMessage.response` as the http response.

## 1.0.0

* added pipeline feature and refactored the solution to have working examples of logging, metrics, authentiation and trace header injection.

## 1.0.1

* added logging to the request handler so that it's obvious when traffic is coming into the http-nats-proxy

## 1.0.2

* now checking the state of the NATS connection to ensure it's in a `CONNECTED` state before trying to send messages.
* reduced the `PingInterval` of the NATS connection to help with reconnections when the NATS server becomes unavailable
* now logging when NATS connection events happen

## 1.0.3

* changing the format of the message that the proxy sends to microservices and the pipeline steps to make them more intuitive. Specifically changed `Cookies, ExtendedProperties, QueryParams, RequestHeaders` and `ResponseHeaders` from name/value collections to `Dictionary<string, object>` so they serialize into a more intuitive json string.

## 1.0.4

* changed the call timings from a tuple to a custom class because tuples do not serialize to json with readable property names (see https://github.com/JamesNK/Newtonsoft.Json/issues/1230)
* renamed property `Body` to `RequestBody` on the `NatsMessage`
* renamed property `Response` to `ResponseBody` on the `NatsMessage`
* introduced the concept of Observers to the request pipeline (see README for details)

## 1.0.5

* enabling CORS

## 1.0.6

* bugfix - when CORS was enabled in release 1.0.5 I didn't fully enable it b/c i didn't include the .AllowCredentials() method on the CORS policy builder
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2018 Wes Shaddix

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2018 Wes Shaddix
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 2d87843

Please sign in to comment.