Rework Asanka's conf solution

Changed from ConfAPI to StaticAPI to make it more general. Other
routes should be added here as well, e.g. statistics. Also fixed
a bug where the site location and the site API were being switched.
Also formatted the function to conform to our guidelines.
Part of #657