Skip to content

Confused by deprecation #5596

@jsumners

Description

@jsumners

fastify/lib/route.js

Lines 425 to 430 in ba276fd

if (shouldExposeHead && isGetRoute && !isHeadRoute && !hasHEADHandler) {
const onSendHandlers = parseHeadOnSendHandlers(headOpts.onSend)
prepareRoute.call(this, { method: 'HEAD', url: path, options: { ...headOpts, onSend: onSendHandlers }, isFastify: true })
} else if (hasHEADHandler && exposeHeadRoute) {
FSTDEP007()
}

I am confused by that deprecation. It was introduced in #4052.

What is the expected behavior if the deprecation is removed? It seems like there are two governing options, which one should be removed?

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