-
Bug
-
Resolution: Won't Fix
-
Medium
-
None
-
None
-
None
-
Standalone JBossWeb 1.0 server using JDK 1.6 on Redhat Enterprise.
The Livesearch plugin returns a liveSearchRoot string in Javascript instructing the Javascript where the server is. This string appears to be formatted with the server base URL from the general configuration page. In reality, Confluence can be accessed via several URLs. In our case, the server base URL is set to "http://wiki/wiki" as most people use just the virtualized system name. However, accessing Confluence via the fqdn (http://wiki.int.janelia.org/wiki) is also perfectly valid and works in all cases except for livesearch. Since livesearch returns a liveSearchRoot of http://wiki/wiki, those who use the fqdn receive "Error: uncaught exception: Permission denied to call method XMLHttpRequest.open" from the browser as the request is not believed to be going to the same server as the javascript originated. This effectively breaks livesearch.
I believe this issue is related to both CONF-9316 and CONF-7241. I understand the comment in CONF-7241 that "if we use the domain in the Java HttpServletRequest object, we will be sending back invalid domains if the server is running behind mod_proxy (as c.a.c and e.a.c both do)". However, like ourselves, I suspect many others are not using mod_proxy and would prefer livesearch to set the liveSearchRoot using using the HttpServletRequest so that multiple machine names (including hostname/fqnd, multi-homed machines and virtualized environments) will work properly.
I suggest adding a parameter to livesearch such as rootsource. The options would be serverBaseURL or httpServletRequest. ServerBaseURL certainly should be the default as to not break any existing installations. But this parameter would allow livesearch to provide much better support in many environments.
- is duplicated by
-
CONFSERVER-9316 {livesearch} macro does not work with https
-
- Closed
-
Hi Peter,
Thanks for the suggestion, but this is not a bug. Confluence does not support multi-homing, and the server base URL is supposed to be configured to the single canonical URL of the server.
Given we don't support the configuration which causes the problem, and also that this option would be very tricky to explain to the average macro user, I'm closing it as "Won't fix". I'd recommend modifying the macro yourself if you require this change. You can find the source code in the Confluence source release under confluence/src/etc/plugins/livesearch.
Perhaps given your situation, you might want to raise a feature request for Confluence to support multi-homing. It would require more changes than just this option, but if you could describe your requirements we could determine whether it will be practical to implement.
Regards,
Matt