Skip to content

log_skip + abort doesn't abort request when outside handle block #7575

@Kangaroux

Description

@Kangaroux

Issue Details

Use case: trying to block spam requests and also not log them

@naughtyUserAgents {
    # Literally just spams favicon.ico. Not related with DuckDuckGo
    header User-Agent *ddg_win*
}

log_skip @naughtyUserAgents
abort @naughtyUserAgents

This doesn't work as I expected: it skips the log but allows the request through.

Wrapping it with a handle does work correctly:

handle @naughtyUserAgents {
    log_skip
    abort
}

Interestingly, this works:

handle_errors {
    log_skip @matcher
    abort @matcher
}

Assistance Disclosure

AI not used

If AI was used, describe the extent to which it was used.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions