Skip to content

Commit e0914e3

Browse files
authored
Merge pull request #247 from nitrictech/fix/catch-all-files-entrypoints-sites
fix: ensure all site routes get sent to index
2 parents e888b8b + bf02b2f commit e0914e3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/base/src/tasks/run/entrypoints.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ describe('createNginxConfig', () => {
7777
expect(config).toContain(`
7878
location / {
7979
root /www/test;
80+
try_files $uri $uri/ /index.html;
8081
}
8182
`);
8283
});

packages/base/src/tasks/run/entrypoints.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export function createNginxConfig(entrypoint: NamedObject<NitricEntrypoint>, sta
7676
(s) => `
7777
location ${s.path} {
7878
root /www/${s.target};
79+
try_files $uri $uri/ /index.html;
7980
}
8081
`,
8182
)

0 commit comments

Comments
 (0)