aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/captcha.php
blob: 37bac4745ff91d7267c8246322dbf0271f2c9dc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php
final class CaptchaController extends StudipController
{
    public function challenge_action(): void
    {
        $this->response->add_header(
            'Expires',
            gmdate('D, d M Y H:i:s', time() + CaptchaChallenge::CHALLENGE_EXPIRATION) . ' GMT'
        );
        $this->render_json(CaptchaChallenge::createNewChallenge());
    }
}