[ 
https://issues.apache.org/jira/browse/NIFI-1711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15275841#comment-15275841
 ] 

ASF subversion and git services commented on NIFI-1711:
-------------------------------------------------------

Commit 257590dec3756b9576faec0543b3ca6a74d114ca in nifi's branch 
refs/heads/master from [~jameswing]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=257590d ]

NIFI-1711 Client-side JS for proxy-friendly URLs. This closes #316


> Content Viewer Format Links Do Not Use Proxy Settings
> -----------------------------------------------------
>
>                 Key: NIFI-1711
>                 URL: https://issues.apache.org/jira/browse/NIFI-1711
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core UI
>    Affects Versions: 0.6.0
>            Reporter: James Wing
>            Priority: Minor
>         Attachments: nifi-content-viewer-format-options.png
>
>
> The content viewer format options do not use proxy settings, and generate bad 
> links on a NiFi installation behind a proxy.  Proxy settings were provided 
> via the HTTP headers X-ProxyScheme, X-ProxyHost, and X-ProxyPort.  The 
> content viewer will initially display unformatted content fine, but then 
> selecting different options such as 'formatted' results in a 404.
> !nifi-content-viewer-format-options.png!
> The URL seems to start life in 
> [header.jsp|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/webapp/WEB-INF/jsp/header.jsp]:
> {code}
> <span id="requestUrl" class="hidden"><%= 
> org.apache.nifi.util.EscapeUtils.escapeHtml(request.getRequestURL().toString())
>  %></span>
> {code}
> Which was sent to the client as follows:
> {code}
> <span id="requestUrl" class="hidden">https://nifi/nifi-content-viewer/</span>
> {code}
> On selecting 'formatted',the event handling Javascript concatenates this with 
> the new view options to navigate to URLs like this:
> {code}
> https://nifi/nifi-content-viewer/?mode=Formatted&access_token=MjZvmd5...
> {code}
> I believe properly generating links that respect the proxy settings on the 
> server would require logic similar to that of 
> [ApplicationResource.generateResourceUri()|https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java#L97].
>   It might also be possible to simply format the links on the client.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to