[
https://issues.apache.org/jira/browse/MESOS-3901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15849487#comment-15849487
]
PAVEL DERENDYAEV edited comment on MESOS-3901 at 2/2/17 6:12 AM:
-----------------------------------------------------------------
This issue bothers me too. We are running Mesos 0.28 behind Nginx proxy and it
works pretty well. But it seems like in newer versions (1.x) behind-the-proxy
mode is forgottern. Angular controllers and services use absolute pathes now
(with prepending slash).
More over, functions like leadingMasterURL in services.js
(https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=blob;f=src/webui/master/static/js/controllers.js;h=07bc612a4d7a6b4b418de964303e8fb7083b5d31;hb=HEAD)
pay attention only to the hostname and the port.
This approach makes almost impossible to run Mesos in our production
environment. Are there any plans to work this out?
was (Author: dddpaul):
This issue bothers me too. We are running Mesos 0.28 behind Nginx proxy and it
works pretty well. But it seems like in newer versions (1.x) behind-the-proxy
mode is forgottern. Angular controllers and services use absolute pathes now
(with prepending slash).
More over, functions like leadingMasterURL in services.js
(https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=blob;f=src/webui/master/static/js/controllers.js;h=07bc612a4d7a6b4b418de964303e8fb7083b5d31;hb=HEAD)
pay attention only to hostname and port.
This approach makes almost impossible to run Mesos in our production
environment. Are there any plans to work this out?
> Enable Mesos to be able know when it is hosted behind a proxy with a URL
> prefix
> -------------------------------------------------------------------------------
>
> Key: MESOS-3901
> URL: https://issues.apache.org/jira/browse/MESOS-3901
> Project: Mesos
> Issue Type: Improvement
> Components: webui
> Reporter: Harpreet
> Labels: mesosphere
>
> If Mesos is run behind a proxy with a URL prefix e.g.
> https://<hostname>:<port>/services/mesos (`/services/mesos` being the URL
> prefix), sandboxes in mesos don't load. This happens because when
> Mesos is accessed through a proxy at
> https://<hostname>:<port>/services/mesos, Mesos tries to request slave state
> from
> https://<hostname>:<port>/slave/20151110-232502-218431498-5050-1234-S1/slave(1)/state.json?jsonp=angular.callbacks._4.
> This URL is missing the /services/mesos path prefix, so the request fails.
> Fixing this by rewriting URLs in the body of every response, would not be a
> clean solution and can be error prone.
> After searching around a bit we've learned that this is apparently a common
> issue with webapps, because there is no standard specification for making
> them aware of their base URL path. Some will allow you to specify a base path
> in configuration[1], others will respect an X-Forwarded-Path header if a
> proxy provides it[2], and others don't handle this at all.
> It would be great to have explicit support in for this in Mesos.
> [1]
> http://search.cpan.org/~bobtfish/Catalyst-TraitFor-Request-ProxyBase-0.000005/lib/Catalyst/TraitFor/Request/ProxyBase.pm
> [2] https://github.com/mattkenney/feedsquish/blob/master/rupta.py#L94
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)