Add 'readonly_ips' option, to allow readonly access for certain IPs when 'private' option is enabled.

[?]
Sep 22, 2017, 11:36 AM
HPGWVEFKM3DYLNLPMWLZI5VZXURUSVJ4FM2DPJCPR5HBOEQPASQQC

Dependencies

  • [2] NX5BM2OI Machine status page: Show disabled machines and some machine stats
  • [3] BPT4WJ7U Remove Persona support
  • [4] 2DHE2ZAK Allow Hydra to run as a private instance by requiring a login.
  • [5] J5UVLXOK * Start of a basic Catalyst web interface.
  • [6] UAPS46BQ
  • [7] HK32XC42
  • [*] SMM4HQTP * Put actions related to builds under /build (e.g. /log/<buildid>

Change contents

  • edit in src/lib/Hydra/Controller/Root.pm at line 15
    [2.10]
    [9.0]
    use List::MoreUtils qw{any};
  • replacement in src/lib/Hydra/Controller/Root.pm at line 24
    [4.1][3.0:48]()
    return $c->request->path eq "google-login" ||
    [4.1]
    [4.87]
    my $hostname = $c->request->headers->header('X-Forwarded-For') || $c->request->hostname;
    my $readonly_ips = $c->config->{readonly_ips} // "";
    my $whitelisted = any { $_ == $hostname } split(/,/, $readonly_ips);
    return $whitelisted ||
    $c->request->path eq "google-login" ||