Page 1 of 1

URLs - sometimes relative, sometimes fully qualified / absolute

Posted: 04 Feb 2019, 21:33
by sarodude
I'm trying to get MantisBT (v 2.19.0) up behind a reverse proxy and am seeing something interesting.

When you view the source, some URLs are relative and some absolute.

Code: Select all

	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/default.css" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/status_config.php?cache_key=d57bdc35992fcef806b32bfdb32c8331" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/dropzone-4.3.0.min.css" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/bootstrap-3.3.6.min.css" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/font-awesome-4.6.3.min.css" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/fonts.css" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/bootstrap-datetimepicker-4.17.47.min.css" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/ace.min.css" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/ace-mantis.css" />
	<link rel="stylesheet" type="text/css" href="http://full.host.name:1080/css/ace-skins.min.css" />

	<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
	<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: full-text search" href="http://full.host.name:1080/browser_search_plugin.php?type=text"/>
	<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: search by Issue Id" href="http://full.host.name:1080/browser_search_plugin.php?type=id"/>
	<script type="text/javascript" src="/javascript_config.php?cache_key=d57bdc35992fcef806b32bfdb32c8331"></script>
	<script type="text/javascript" src="/javascript_translations.php?cache_key=1e0513ca8d97cc96a7575d998beb890a"></script>
	<script type="text/javascript" src="/js/jquery-2.2.4.min.js"></script>
	<script type="text/javascript" src="/js/dropzone-4.3.0.min.js"></script>
	<script type="text/javascript" src="/js/common.js"></script>
This is wreaking a bit of havoc on my situation because the browser is complaining about CSP security issues since it appears that the host is changing. The resources using relative URLs work while those fully qualified do not, The browser is making a port 80 request - albeit to the same hostname (obfuscated as full.host.name).

Thoughts? Feature? Bug? My ignorance?

-Saro

Re: URLs - sometimes relative, sometimes fully qualified / absolute

Posted: 06 Feb 2019, 17:48
by sarodude

Re: URLs - sometimes relative, sometimes fully qualified / absolute

Posted: 06 Feb 2019, 23:09
by truefriend-cz
I have this problem with URL...

https://www.mantisbt.org/bugs/view.php?id=25237