Hit a rather odd issue, unsure if I'm missing a config option or if it's a bug.
Making use of the Openfrontier Gerrit docker image
https://github.com/openfrontier/docker-gerrit/ as part of a collection of containers including Jenkins, Zuul and nginx.
I've configured multiple services to talk to one another in separate containers, using nginx as a reverse proxy in front of them to provide a single web front end for all of them, instead of requiring different ports:
gerrit =>
http://localhost:8080/gerritjenkins =>
http://localhost:8080/jenkinszuul =>
http://localhost:8080/zuulI've configured gerrit to use DEVELOPMENT_BECOME_ANY_ACCOUNT for this test env, and when I go to use 'Become' (
http://localhost:8080/gerrit/login/%23%2F) and click on the 'Administrator' user it always redirects me back to '
http://localhost:8080/#' instead of '
http://localhost:8080/gerrit/#'.
The url given for the link to become the Administrator user is:
http://localhost:8080/gerrit/login/%23%2F?account_id=1The authentication works, so if I go back to '
http://localhost:8080/gerrit/' after being redirected to '
http://localhost:8080/#', everything works as expected.
So it just appears as though the redirect that occurs after the switch account, fails to use the canonicalWebUrl.
As I'm planning to give a demo with this set up, it would be nice if it's just a simple config option I'm missing to ensure the correct behaviour?
gerrit config
----------
[gerrit]
basePath = git
serverId = ....
canonicalWebUrl =
http://localhost:8080/gerrit/[database]
type = mysql
database = reviewdb
hostname = percona
port = 3306
username = gerrit2@gerrit
[auth]
type = DEVELOPMENT_BECOME_ANY_ACCOUNT
switchAccountUrl = $canonicalWebUrl/login
[receive]
enableSignedPush = false
[sendemail]
smtpServer = localhost
enable = false
[container]
user = gerrit2
javaHome = /usr/lib/jvm/java-1.8-openjdk/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:8080/
[cache]
directory = cache
[plugins]
allowRemoteAdmin = true
[gitweb]
cgi = /usr/share/gitweb/gitweb.cgi
------------
--
Darragh