Page History
...
Code Block | ||||
---|---|---|---|---|
| ||||
error_log logs/error.log; events { worker_connections 1024; } http { upstream revProxyRuntime { # 1: Replace <host>:<port>, example: my.runtime.local:8080 server <host>:<port>; } server { include ../conf/mime.types; listen 1337; # Instruct the browser to always verify that its cache is up-to-date add_header Cache-Control 'max-age=0, must-revalidate'; location / { root html; index index.html index.htm; try_files $uri $uri/ /index.html =404; } # 2: /server matches with what was configured in the environment.ts baseUrl location /server { proxy_set_header Host $host; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Port $server_port; # 3: This uses the upstream (step 1): So this becomes: http://host:port/Runtime/server/$and_the_rest_of_it; # Only change the /Runtime part if needed so proxy_pass http://revProxyRuntime/Runtime$request_uri; proxy_cookie_path /Runtime /; } } } |
External Theme
When your custom theme is configured as a external theme in the Development Tools Component, you should add an additional location block for /runtime calls. Without doing so the development toolbar is unable to retrieve session information from the runtime when you start a project using the your custom theme as the external theme. More information about configuring external themes can be found here.
Code Block | ||||
---|---|---|---|---|
| ||||
error_log logs/error.log; events { worker_connections 1024; } http { upstream revProxyRuntime { # 1: Replace <host>:<port>, example: my.runtime.local:8080 ... } server { include ../conf/mime.types; listen 1337; # Instruct the browser to always verify that its cache is up-to-date add_header Cache-Control 'max-age=0, must-revalidate'; location / { ... } # 2: /server matches with what was configured in the environment.ts baseUrl location /server { ... } # 3: /runtime matches Runtime calls which are made by the development toolbar location /runtime { proxy_set_header Host $host; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Port $server_port; # 4: This uses the upstream (step 1): So this becomes: http://host:port/Runtime/server/$and_the_rest_of_it; # Only change the /Runtime part if needed so proxy_pass http://revProxyRuntime$request_uri; proxy_cookie_path /Runtime /; } } } |
Overview
Content Tools