diff --git a/webapi/1/.htaccess b/webapi/1/.htaccess
new file mode 100644
index 0000000000..61f4c4f1b7
--- /dev/null
+++ b/webapi/1/.htaccess
@@ -0,0 +1,2 @@
+Header set Access-Control-Allow-Origin "http://dengine.net"
+
diff --git a/webapi/1/builds.php b/webapi/1/builds.php
index 2bf5408224..8fd33b8a73 100644
--- a/webapi/1/builds.php
+++ b/webapi/1/builds.php
@@ -66,6 +66,7 @@ function download_file($filename, $mirror)
function generate_header($page_title)
{
+ header("Cache-Control: max-age=3600");
header('Content-Type: text/html;charset=UTF-8');
cache_echo("\n");
@@ -146,7 +147,7 @@ function generate_build_page($number)
."
"
."
$mb_size MB
");
if (!empty($bin['signature'])) {
- cache_echo("
Sig ⇣ ");
+ cache_echo("
Sig ⇣ ");
}
cache_echo("
MD5: $bin[md5]
");
cache_echo("
\n");
@@ -157,7 +158,7 @@ function generate_build_page($number)
$bits = ' '.$plat['cpu_bits'].'-bit ';
}
cache_echo("$fext$bits⇣");
- cache_echo(" | Mirror ⇣");
+ cache_echo(" | Mirror ⇣");
cache_echo(" | \n");
}
}
@@ -294,6 +295,7 @@ function generate_build_index_page()
function generate_build_feed()
{
+ header("Cache-Control: max-age=10800");
header('Content-Type: application/rss+xml');
$ckey = cache_key('builds', 'feed');
diff --git a/webapi/1/news.php b/webapi/1/news.php
index 1a76eb9d96..5695dd8899 100644
--- a/webapi/1/news.php
+++ b/webapi/1/news.php
@@ -20,9 +20,10 @@
function fetch_blog_feed($category)
{
+ header("Cache-Control: max-age=900");
header('Content-Type: application/json');
- $json_url = "http://dengine.net/blog/category/$category/?json=true";
+ $json_url = "http://dengine.net/blog/category/$category/?json=true&count=3";
$ckey = cache_key('news', $category);
if (cache_try_load($ckey)) {
cache_dump();