In our application we don't want to rely on the IIS server serving the default [STATUS].htm file whenever the user encounters a 4xx error and a global setting for all our IIS websites in the IIS server isn't desirable, as some websites rely on the default handling of errors in IIS. We'd rather pass through the error handling to the SvelteKit application.
I've added an optional config for setting the httpErrors.existingResponse attribute to Auto, Replace or PassThrough. The httpErrors-config could be extended to include more attributes in the future, as specified in the \<httpErrors>-docs, but I'm not familiar enough with the other attributes to know if some other config is required as well.
In our application we don't want to rely on the IIS server serving the default
[STATUS].htm
file whenever the user encounters a 4xx error and a global setting for all our IIS websites in the IIS server isn't desirable, as some websites rely on the default handling of errors in IIS. We'd rather pass through the error handling to the SvelteKit application.I've added an optional config for setting the
httpErrors.existingResponse
attribute to Auto, Replace or PassThrough. ThehttpErrors
-config could be extended to include more attributes in the future, as specified in the \<httpErrors>-docs, but I'm not familiar enough with the other attributes to know if some other config is required as well.