Skip to content

Commit

Permalink
Add router https_redirect_status_code filed
Browse files Browse the repository at this point in the history
(cherry picked from commit 77c6636)
  • Loading branch information
yang-xiaodong authored and narate committed Oct 5, 2019
1 parent 7fbd0b8 commit 7620305
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions assets/js/app/routes/partials/form-route-013.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
</p>
</div>
</div>
<div class="form-group" ng-class="{'has-error' : errors.https_redirect_status_code}">
<label class="col-sm-3 control-label">Https redirect status code <br><em><small class="help-block">optional</small></em></label>
<div class="col-sm-9">
<input type="number" class="form-control" ng-model="route.https_redirect_status_code">
<p class="help-block">
The status code Kong responds with when all properties of a Route match except the protocol,
i.e. if the protocol of the request is <code>HTTP</code> instead of <code>HTTPS</code>.
<code>Location</code> header is injected by Kong if the field is set to 301, 302, 307 or 308.
Defaults to <code>426</code>.
</p>
</div>
</div>
<div class="form-group" ng-class="{'has-error' : errors.regex_priority}">
<label class="col-sm-3 control-label">Regex priority <br><em><small class="help-block">optional</small></em></label>
<div class="col-sm-9">
Expand Down
1 change: 1 addition & 0 deletions assets/js/app/routes/routes-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
paths: [],
strip_path: true,
preserve_host: false,
https_redirect_status_code: 426,
regex_priority: 0
}
}
Expand Down

0 comments on commit 7620305

Please sign in to comment.