Skip to content
Snippets Groups Projects
Commit 65c855a1 authored by ale's avatar ale
Browse files

Plugin to add Cache-Control headers to robots.txt

parent 8917269f
No related branches found
No related tags found
No related merge requests found
Pipeline #54194 passed
<?php
/*
* Plugin Name: A/I - Robots.txt caching
* Description: Add cache-control headers to robots.txt
* Version: 0.0.1
* Author: Autistici/Inventati
* Author URI: https://autistici.org
*/
function ai_robots_txt_add_cache_headers() {
header("Cache-Control", "max-age=86400");
}
add_action('do_robotstxt', 'ai_robots_txt_add_cache_headers');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment