mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
fix(cloudflare): base strip logic (#6550)
This commit is contained in:
parent
ff5f1e89a1
commit
2c829fdf65
2 changed files with 6 additions and 1 deletions
5
.changeset/early-kangaroos-invent.md
Normal file
5
.changeset/early-kangaroos-invent.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/cloudflare': patch
|
||||
---
|
||||
|
||||
fix `config.base` trimming logic for cloudflare integration `_routes.json` generation
|
|
@ -156,7 +156,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
|
|||
let pagePath = prependForwardSlash(page.pathname);
|
||||
if (_config.base !== '/') {
|
||||
const base = _config.base.endsWith('/')
|
||||
? _config.base.substring(0, -1)
|
||||
? _config.base.slice(0, -1)
|
||||
: _config.base;
|
||||
pagePath = `${base}${pagePath}`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue