4 ms·
I'm using Netlify for one of my side projects. Liking it so far but been getting annoyed by the limited _headers/netlify.toml config these days (especially cust
by cheeaun 5y ago
I'm using Netlify for one of my side projects. Liking it so far but been getting annoyed by the limited _headers/netlify.toml config these days (especially custom redirects).
- swyx 5y agowhat limitation are you running into? did something change recently?
- cheeaun 5y agoI think it's been the same, just recently I need a way to set custom headers for specific paths. Documentation [1] says that I can use * or :placeholder(s?), but there's no examples other than "/*" (which matches everything). I thought it can do matches like "/folder/*/*.html" but... actually can't. I try look around in the forums, seeing others got confused as well and in the end I gave up :D As for redirects, I really like :splat [2], but for my use case, I need something can be matched in the middle of the URL string, e.g.: /blog/:splat/whatever. Maybe this is like a weird use-case, or rather I'm thinking of it like glob patterns or regex. [1] https://docs.netlify.com/routing/headers/ https://docs.netlify.com/routing/headers/ [2] https://docs.netlify.com/routing/redirects/redirect-options/#splats https://docs.netlify.com/routing/redirects/redirect-options/...