You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use nginx to serve the static files, the parent index.html displayed correctly. However, when I navigated to sub-directory, the browser get the wrong assets path, and I got this error in console Uncaught SyntaxError: Unexpected token '<'.
For example: The site displayed correctly when I navigated to http://localhost:8081/guides/zh/, but not http://localhost:8081/guides/zh/sub/; I have to add index.html(http://localhost:8081/guides/zh/sub/index.html) at the end of path manually then it will display correctly.
I tried to use nginx to serve the static files, the parent index.html displayed correctly. However, when I navigated to sub-directory, the browser get the wrong assets path, and I got this error in console
Uncaught SyntaxError: Unexpected token '<'
.For example: The site displayed correctly when I navigated to
http://localhost:8081/guides/zh/,
but nothttp://localhost:8081/guides/zh/sub/
; I have to add index.html(http://localhost:8081/guides/zh/sub/index.html
) at the end of path manually then it will display correctly.nginx configuration:
`server {
gzip on;
gzip_min_length 1k;
gzip_comp_level 9;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-
httpd-php image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable "MSIE [1-6].";
}
`
Is there any documentations that can help? Thanks.
The text was updated successfully, but these errors were encountered: