File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 23
23
RewriteRule ^/(.*route_schedules.*) %{ENV:GORMUNGANDR_URL}/$1 [P]
24
24
ProxyPassReverse / %{ENV:GORMUNGANDR_URL}/
25
25
26
+ RewriteCond %{ENV:GORMUNGANDR_VERSION} 2
27
+ RewriteCond %{REQUEST_URI} ".*journeys.*"
28
+ RewriteCond %{QUERY_STRING} "from="
29
+ RewriteCond %{QUERY_STRING} "to="
30
+ RewriteRule ^/(.*) %{ENV:GORMUNGANDR_URL}/$1 [P]
31
+ ProxyPassReverse / %{ENV:GORMUNGANDR_URL}/
32
+
26
33
AddOutputFilterByType DEFLATE application/json
27
34
28
35
CustomLog /var/log/apache2/access.log vhost_combined_timetaken
Original file line number Diff line number Diff line change @@ -10,10 +10,11 @@ Usage: ${0##*/} -m monitor-process -r max-requests
10
10
-m [0|1] activate monitor-process
11
11
-r max-requests before reload for jormungandr worker
12
12
-g Optional: gormungandr url for route_schedules API (Example: http://gormungandr)
13
+ -v Optional: gormungandr version API : route_schedules(1), route_schedules and journeys(2)
13
14
EOF
14
15
}
15
16
16
- while getopts " m:r:c:g:h" opt; do
17
+ while getopts " m:r:c:g:v: h" opt; do
17
18
case $opt in
18
19
m) monitor_processes=$OPTARG
19
20
;;
@@ -23,6 +24,8 @@ while getopts "m:r:c:g:h" opt; do
23
24
;;
24
25
g) gormungandr_url=$OPTARG
25
26
;;
27
+ v) gormungandr_version=$OPTARG
28
+ ;;
26
29
h|\? )
27
30
show_help
28
31
exit 1
50
53
51
54
jormungandr_cache2=" name=jormungandr,items=${jormun_cache_items} "
52
55
53
- if [[ ! -z $gormungandr_url ]]
56
+ if [[ ! -z $gormungandr_url ]] && [[ ! -z $gormungandr_version ]] ;
54
57
then
55
58
echo " export GORMUNGANDR_URL=$gormungandr_url " >> /etc/apache2/envvars
59
+ echo " export GORMUNGANDR_VERSION=$gormungandr_version " >> /etc/apache2/envvars
56
60
fi
57
61
# run apache2
58
62
service apache2 start
You can’t perform that action at this time.
0 commit comments