-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
* master: Retry connecting to mongodb on startup failures. Whoops, remove some debug stuff from f3bc4c4 Fix some race conditions in tests that led to periodic failures. Improve error handling during tests if redis or mongo connections fail. Flip order of test matchers to properly reflect "expected" output. Standardize on CircleCI for testing. Let the import_nginx_logs script uncompress gzipped logs on the fly. Revamp logging to use Bunyan and cleanup how Rollbar errors are logged. Experimenting with sending more detailed error logs to rollbar. Begin refactoring log collection process.
Thanks! This looks great, and this seems like like a handy feature. Just a couple of quick comments.
Thanks again! And if you don't have time to add a test, or you're not comfortable in the testing code, I'd be happy to add one, but it might be tomorrow before I can do that. |
I will see if I can get a test going tomorrow morning. I figured it wasn't worth handling templates and non-templates separately. I have to believe Handlebars generates a compiled template for static text that doesn't result in much overhead. I wouldn't be surprised if they have optimizations for this special case. I guess we'll have to think about how we implement this feature in Lua land as well. |
- add test specs - handle sub-url headers - only set dynamic header if it evaluates to a value
- accidentally resetting cache settings
I have added a reasonably complete test suite for dynamic headers, exercising some of their more advanced capabilities. I have the per API and sub-url cases covered. Are there any others that may not be covered by the api_matcher? (i.e. global headers across all APIs?) I made a design decision that if the handlebars template evaluates to nothing, the header will not be set. So, this would allow you to set/override a header only if another header had a value for example. For example, use x-forwarded-proto as-is unless x-original-proto has a value, in which case use it. You also have access to use default values through handlebars (example includes in the tests). Given this decision, you would not be able to remove a header though using the dynamic headers. Thoughts? |
Fantastic, thanks so much for the pull request and additional tests! This will be part of the v0.7 package releases, that I meant to get to last week, but will try to definitely get to this week. |
Configurable system-wide URL redirects
Simpler query builder interface for constructing admin analytics queries
I have to add Headers in Global RequestSetting but there is no to add in Analytics Path These are all doing in Api Umberlla |
Add support for dynamic HTTP header values by using a handlebars template as the heaver value instead of a static value. This allows header values to be derived from other headers or other attributes of the request.
For example:
x-original-proto: {{headers.x-forwarded-proto}}