Robert Brewer committed 2858abd

Fix for #476 (BaseURLFilter doesn't use socket_port).

Comments (0)

Files changed (1)


         request = cherrypy.request
-        newBaseUrl = cherrypy.config.get('base_url_filter.base_url', 'http://localhost')
+        port = str(cherrypy.config.get('server.socket_port', '80'))
+        if port == "80":
+            defaultUrl = 'http://localhost'
+        else:
+            defaultUrl = 'http://localhost:%s' % port
+        newBaseUrl = cherrypy.config.get('base_url_filter.base_url', defaultUrl)
         if cherrypy.config.get('base_url_filter.use_x_forwarded_host', True):
             newBaseUrl = request.headers.get("X-Forwarded-Host", newBaseUrl)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.