Skip to content

Commit

Permalink
Assets CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslav-ilin committed Jun 10, 2024
1 parent 49b996b commit 1aa1cc9
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ fmt :
test :
@ $(MAKE) --directory=lib/maxmind test

assets/cdn/maxmind/GeoLite2-Country.mmdb :
mkdir -p `dirname $@`
curl -vL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${MAXMIND_LICENSE_KEY}&suffix=tar.gz" | tar --strip-components 1 -xzv -C `dirname $@`
ls -lAh `dirname $@`

.PHONY : distclean
distclean :
-@ $(MAKE) --directory=lib/maxmind clean
Expand Down
2 changes: 2 additions & 0 deletions assets/cdn/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*
! Access-Control-Allow-Origin
1 change: 1 addition & 0 deletions assets/cdn/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/ https://nilfalse.com/ctf/ 301
46 changes: 46 additions & 0 deletions assets/cdn/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Capture The Flag</title>
<meta http-equiv="refresh" content="0; url=https://nilfalse.com/ctf/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="https://nilfalse.com" rel="preconnect" />
<style>
body {
padding: 0;
margin: 0;
font-family: 'Segoe UI', Segoe, Tahoma, Geneva, sans-serif;
font-size: 16px;
background-color: #f2f5f7;
color: #829ca9;
}
.header {
padding: 16px 24px;
background-color: #00bbff;
color: rgba(255, 255, 255, 0.87);
}
.header ::selection {
background-color: #fe57a1;
}

.content {
padding: 16px 32px;
}
</style>
</head>
<body>
<header class="header">
<h1 class="header__text">Capture The Flag</h1>
</header>
<p class="content">
Redirecting to
<a href="https://nilfalse.com/ctf/">nilfalse.com/ctf</a>
</p>
</body>

<script>
location.replace('https://nilfalse.com/ctf/');
</script>
</html>
1 change: 1 addition & 0 deletions assets/cdn/maxmind/COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Database and Contents Copyright (c) 2024 MaxMind, Inc.
3 changes: 3 additions & 0 deletions assets/cdn/maxmind/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Use of this MaxMind product is governed by MaxMind's GeoLite2 End User License Agreement, which can be viewed at https://www.maxmind.com/en/geolite2/eula.

This database incorporates GeoNames [https://www.geonames.org] geographical data, which is made available under the Creative Commons Attribution 4.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/.
2 changes: 2 additions & 0 deletions assets/cdn/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow: /

0 comments on commit 1aa1cc9

Please sign in to comment.