I'm trying to set a 404 HTTP status response code for an ajax controller action in a plugin.
Yii has a response object where the code can be set, but I can't find a way to access it from craft.
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.Sign up to join this community
I believe HeaderHelper::setHeader() is what you're looking for in the context of a plugin.