Page MenuHomePhabricator

Decide how to support polygerrit
Closed, ResolvedPublic

Description

Though we doint use it yet at gerrit.wikimedia.org in the next update we do which is 2.14, polygerrit will be exposed so we can use both gwt and polygerrit through a config.

But theres one problem with that, it doesn't support prefixed urls like /r/ (gerrit.wikimedia.org/r/)

That bug is tracked at https://bugs.chromium.org/p/gerrit/issues/detail?id=5400

But i did find some success with doing the following rewrite rules

   RewriteEngine On
  AllowEncodedSlashes On
RewriteRule ^/q/(.*)$ http://gerrit.new/r/q/$1
RewriteRule ^/styles/(.*)$ http://gerrit.new/r/styles/$1
RewriteRule ^/bower_components/(.*)$ http://gerrit.new/r/bower_components/$1
RewriteRule ^/elements/(.*)$ http://gerrit.new/r/elements/$1
RewriteRule ^/config/(.*)$ http://gerrit.new/r/config/$1
RewriteRule ^/accounts/(.*)$ http://gerrit.new/r/accounts/$1
RewriteRule ^/login/(.*)$ http://gerrit.new/r/login/$1
RewriteRule ^/changes/(.*)$ http://gerrit.new/r/changes/$1
RewriteRule ^/projects/(.*)$ http://gerrit.new/r/projects/$1
RewriteRule ^/c/(.*)$ http://gerrit.new/r/c/$1

But that doesn't actually fix it but rather lets users test the new skin out in limited compacity.

Event Timeline

This will require upstream to fix it for it to work 100% , but if someone else knows how to fix it upstream are more then wiling to review your patches.

polygerrit works 100% on urls like / but not on prefixed urls.

demon claimed this task.

Decision: let's just wait for them to fix the bug.

This now works without rewrites too :)

Very nice that we don't need the rewrites anymore :)