URLs - sometimes relative, sometimes fully qualified / absolute

Get help from other users here.

Moderators: Contributor, Developer

Post Reply
sarodude
Posts: 7
Joined: Jan 30, 2019 2:15 pm

URLs - sometimes relative, sometimes fully qualified / absolute

Post by sarodude » Feb 04, 2019 4:33 pm

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


truefriend-cz
Posts: 65
Joined: Jan 08, 2019 2:14 am

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

Post by truefriend-cz » Feb 06, 2019 6:09 pm

I have this problem with URL...

https://www.mantisbt.org/bugs/view.php?id=25237
Mantis version: 2.19.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english

Post Reply