moved ssl above middleware, fixed locales indentatio