File tree 2 files changed +43
-14
lines changed
2 files changed +43
-14
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,44 @@ http {
60
60
rewrite ^ https://$host$request_uri? permanent;
61
61
}
62
62
63
- location / {
64
- proxy_pass http://app_server;
65
- }
66
-
67
- <% if ENV['USE_FASTBOOT'] %>
68
- # Just in case, only forward "/policies" to Ember for a moment
69
- location = /policies {
70
- proxy_pass http://localhost:9000;
71
- }
63
+ <% if ENV['USE_FASTBOOT'] == "staging-experimental" %>
64
+ # Experimentally send all non-backend requests to FastBoot
65
+
66
+ location /api/ {
67
+ proxy_pass http://app_server;
68
+ }
69
+
70
+ # Hacks to deal with backend paths that are not under /api/
71
+ location /authorize {
72
+ proxy_pass http://app_server;
73
+ }
74
+ location /authorize_url {
75
+ proxy_pass http://app_server;
76
+ }
77
+ location /logout {
78
+ proxy_pass http://app_server;
79
+ }
80
+
81
+ # FastBoot
82
+ location / {
83
+ proxy_pass http://localhost:9000;
84
+ }
85
+ <% elsif ['USE_FASTBOOT'] %>
86
+ # Fastboot is enabled only for allowed paths
87
+
88
+ location = /policies {
89
+ proxy_pass http://localhost:9000;
90
+ }
91
+
92
+ location / {
93
+ proxy_pass http://app_server;
94
+ }
95
+ <% else %>
96
+ # FastBoot is disabled, backend sends the static Ember index HTML for non-backend paths
97
+
98
+ location / {
99
+ proxy_pass http://app_server;
100
+ }
72
101
<% end %>
73
102
74
103
location ~ ^/api/v./crates/new$ {
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -ue
3
3
4
- if [[ " ${USE_FASTBOOT:- 0} " = 1 ]]; then
5
- export USE_FASTBOOT=1
4
+ if [[ -z " ${USE_FASTBOOT} " ]]; then
5
+ unset USE_FASTBOOT
6
+ bin/start-nginx ./target/release/server
7
+ else
8
+ export USE_FASTBOOT
6
9
node --optimize_for_size --max_old_space_size=200 fastboot.js &
7
10
bin/start-nginx ./target/release/server &
8
11
wait -n
9
- else
10
- unset USE_FASTBOOT
11
- bin/start-nginx ./target/release/server
12
12
fi
You can’t perform that action at this time.
0 commit comments