Jeremy Evans <[email protected]> wrote: > I was originally looking for a way to turn off default middleware > without having to specify the -N command line option every time. > After reading the Unicorn.builder code, I thought it may be > possible to do this by specifying the option as an embedded option > in the rackup file, via the following line at the top of the file: > > #\-N > > Unfortunately, while this works for many other command line options, > because of Unicorn's internals, this doesn't work for -N, as > embedded options are not parsed until after the check for skipping > default middleware is made.
That was intentional, I think. We should never be encouraging users to pollute config.ru and make it difficult to migrate/test other servers. > This patch makes the embedded -N option work, as well as adds a > default_middleware configuration file option I really hate the -N vs RACK_ENV=none redundancy... Is -N still needed for Rails or something else while keeping RACK_ENV unset? Worse case is we only support default_middleware as a config option (but I prefer not to add more options). Embedded -N support is an anti-feature which leads to lock-in. Thanks. -- unsubscribe: [email protected] archive: https://bogomips.org/unicorn-public/
