I would like to have the same URL respond with different content, depending on the
Is that possible via file based configuration?
Or, even better, if I just drop an
index.js alongside a
index.html, will that work?
Thank you, love netlify!
The only way I know of serving different content based the
Content-Type request header is to use functions.
Can you offer more information about what it is you are trying to achieve?
I was hoping there was some way to set up the default file based on the content type using the toml file: a function for just that probably isn’t worth it.
Thank you for the suggestion though!
This is not something configurable by a user. However, you can use redirects to some extent. If you call the URL like:
i ended up making this work with two steps:
works perfectly, with the correct content-type taken from the redirect!
Thank you netlify!