-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy: use a global switch for Filter Middleware #501
Changes from 4 commits
39fc874
3c7bbfe
a496a21
02926b2
0d02286
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,11 @@ const defaultConfigurationFileName = "filter.conf" | |
func FilterConfigurationFileName() string { | ||
return envy.Get("ATHENS_FILTER_FILENAME", defaultConfigurationFileName) | ||
} | ||
|
||
// FilterOff checks PROXY_FILTER_OFF env and returns | ||
// true of it's equal to "true", otherwise false always. | ||
// It defaults to "true" until Olympus is the default | ||
// place to grab modules before the Proxy. | ||
func FilterOff() bool { | ||
return envy.Get("PROXY_FILTER_OFF", "true") == "true" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the envy call default to like the way it is now, with default of true, if the user does not set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess not, re-reading the comment clears that up. :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes by default, it's just the Proxy, no filtering needed. But we will use Olympus by default once Olympus is ready. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍