joyent/triton-cns#22 Want support for reverse proxy zones#23
Open
arekinath wants to merge 1 commit intoTritonDataCenter:masterfrom
Open
joyent/triton-cns#22 Want support for reverse proxy zones#23arekinath wants to merge 1 commit intoTritonDataCenter:masterfrom
arekinath wants to merge 1 commit intoTritonDataCenter:masterfrom
Conversation
kusor
reviewed
May 27, 2020
kusor
left a comment
There was a problem hiding this comment.
@arekinath other than minor copyright issues and a suggestion to use braces, looks good to me. Btw, feel free to ping me directly when you need a CR.
| @@ -5,6 +5,7 @@ | |||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |||
| * | |||
| * Copyright (c) 2018, Joyent, Inc. | |||
There was a problem hiding this comment.
This will give us build issues if you don't modify to Copyright 2020 Joyent, Inc. Mind to change that line too?
| type: 'string'}, | ||
| {field: 'proxy_networks', stringify: function (v) { | ||
| v = v || []; | ||
| if (v.length === 1 && v[0] === '*') |
There was a problem hiding this comment.
Nit: can we use braces for conditionals?
| @@ -4,6 +4,7 @@ | |||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | |||
| * | |||
| * Copyright (c) 2018, Joyent, Inc. | |||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| * | ||
| * Copyright (c) 2018, Joyent, Inc. | ||
| * Copyright 2016, 2020, The University of Queensland |
|
|
||
| function isProxied(ent, config) { | ||
| var zoneConfig = config.forward_zones[ent.zone]; | ||
| if (!zoneConfig.proxy_networks) |
There was a problem hiding this comment.
Same braces thing than above. Also, why parentheses around the boolean keywords?
Comment on lines
+304
to
+305
| if (isProxied(ent, config)) | ||
| ip = config.forward_zones[ent.zone].proxy_addr; |
| use_alias: true, | ||
| forward_zones: { | ||
| 'foo': { networks: ['*'] } | ||
| 'foo': { |
There was a problem hiding this comment.
Can we bump Joyent Copyright notice of this file too, please?
bahamat
suggested changes
May 28, 2020
Contributor
bahamat
left a comment
There was a problem hiding this comment.
I'd also like to see some documentation as to how this gets used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #22.
Tested on CoaL and by running auto-tests. Not sure about documentation for this, maybe we should visit that as a separate commit?