Unverified Commit b6caffd6 authored by Julien Bouquillon's avatar Julien Bouquillon 🐫 Committed by GitHub
Browse files

fix: handle next.js 404/index.html (#855)

parent 255235a1
......@@ -44,6 +44,7 @@ http {
recursive_error_pages on;
location ~* ^/404\.html$ {
try_files /404.html /404/index.html
error_page 404 = @error404;
}
......
#!/usr/bin/env bats
load '../../.bats/common.bats.bash'
setup_file() {
docker-compose run \
--detach \
--publish 8888:80 \
--rm \
--volume ${BATS_TEST_DIRNAME}/fixtures-404:/usr/share/nginx/html \
alpine
}
teardown_file() {
docker-compose rm -sf
}
@test "nginx: should return 404 page for next.js exports (not a SPA)" {
run wget --content-on-error --output-document - http://localhost:8888/pouet
assert_output --partial "CUSTOM 404 PAGE"
}
nginx/test/index.html with VERSION=%%VERSION%%
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment