You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2020/03/04 10:04:42 UTC
[GitHub] [knox] abhi2196 opened a new pull request #277: KNOX-2258 - Add
filter for Location header
abhi2196 opened a new pull request #277: KNOX-2258 - Add filter for Location header
URL: https://github.com/apache/knox/pull/277
## What changes were proposed in this pull request?
Follow up for #276
Added a new filter in Livy rewrite.xml for replacing Location header
Removed rewrite rules from routes path in service.xml
## How was this patch tested?
Manually tested in a Cluster with Knox and Livy Services.
1. Edited the rewrite/service.xml for Livy service with the changes.
2. Verified that `https://<KNOX_HOST:KNOX_PORT>/gateway/default/livy` gets redirected to `https://<KNOX_HOST:KNOX_PORT>/gateway/default/livy/ui`
3. Verified that `https://<KNOX_HOST:KNOX_PORT>/gateway/default/livy/` gets redirected to `https://<KNOX_HOST:KNOX_PORT>/gateway/default/livy/ui`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [knox] moresandeep merged pull request #277: KNOX-2258 - Add filter
for Location header
Posted by GitBox <gi...@apache.org>.
moresandeep merged pull request #277: KNOX-2258 - Add filter for Location header
URL: https://github.com/apache/knox/pull/277
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [knox] moresandeep commented on a change in pull request #277:
KNOX-2258 - Add filter for Location header
Posted by GitBox <gi...@apache.org>.
moresandeep commented on a change in pull request #277: KNOX-2258 - Add filter for Location header
URL: https://github.com/apache/knox/pull/277#discussion_r387695217
##########
File path: gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
##########
@@ -49,4 +49,10 @@
<rewrite template="{$frontend[url]}/livy/ui/"/>
</rule>
+ <filter name="LIVYSERVER/livy/outbound/headers">
Review comment:
Where is this filter getting called from ? we need a corresponding entry in service.xml
```xml
<route path="/livy">
<rewrite apply="LIVYSERVER/livy/outbound/headers" to="response.headers"/>
</route>
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [knox] abhi2196 commented on a change in pull request #277:
KNOX-2258 - Add filter for Location header
Posted by GitBox <gi...@apache.org>.
abhi2196 commented on a change in pull request #277: KNOX-2258 - Add filter for Location header
URL: https://github.com/apache/knox/pull/277#discussion_r387739338
##########
File path: gateway-service-definitions/src/main/resources/services/livy/0.4.0/service.xml
##########
@@ -24,12 +24,8 @@
</metadata>
<routes>
<route path="/livy/**?**"/>
- <route path="/livy">
Review comment:
Sure Added the relevant change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [knox] moresandeep commented on a change in pull request #277:
KNOX-2258 - Add filter for Location header
Posted by GitBox <gi...@apache.org>.
moresandeep commented on a change in pull request #277: KNOX-2258 - Add filter for Location header
URL: https://github.com/apache/knox/pull/277#discussion_r387695564
##########
File path: gateway-service-definitions/src/main/resources/services/livy/0.4.0/service.xml
##########
@@ -24,12 +24,8 @@
</metadata>
<routes>
<route path="/livy/**?**"/>
- <route path="/livy">
Review comment:
Like mentioned previously we need an entry to call the filter.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [knox] moresandeep commented on a change in pull request #277:
KNOX-2258 - Add filter for Location header
Posted by GitBox <gi...@apache.org>.
moresandeep commented on a change in pull request #277: KNOX-2258 - Add filter for Location header
URL: https://github.com/apache/knox/pull/277#discussion_r387760656
##########
File path: gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
##########
@@ -49,4 +49,10 @@
<rewrite template="{$frontend[url]}/livy/ui/"/>
</rule>
+ <filter name="LIVYSERVER/livy/outbound/headers">
Review comment:
They should not be, that is weird.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [knox] abhi2196 commented on a change in pull request #277:
KNOX-2258 - Add filter for Location header
Posted by GitBox <gi...@apache.org>.
abhi2196 commented on a change in pull request #277: KNOX-2258 - Add filter for Location header
URL: https://github.com/apache/knox/pull/277#discussion_r387739244
##########
File path: gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
##########
@@ -49,4 +49,10 @@
<rewrite template="{$frontend[url]}/livy/ui/"/>
</rule>
+ <filter name="LIVYSERVER/livy/outbound/headers">
Review comment:
Sure Added the relevant change.
But not sure why it is working in my test cluster without calling this filter explicitly in route path, are these filters/rules applied by default based on matched pattern ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services