At the moment, response headers are set using meta-routes (whose names/lines begin with @). However, the natural way to group and order response header configuration is conflicted with the natural way to order routes in the routing configuration. This leads to a lot of duplication and makes the configuration difficult to understand.
Perhaps would could move response header setting into another file, with its own syntax that is based around a hierarchy of paths, rather the order in which configuration lines are placed in the file.