Skip to content

Commit

Permalink
feat(error): add 429 error page for ratelimiting
Browse files Browse the repository at this point in the history
  • Loading branch information
alanzhu0 committed Aug 8, 2023
1 parent a00837f commit b809446
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
1 change: 1 addition & 0 deletions Ion.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3523,6 +3523,7 @@ intranet/templates/error/csrf.html
intranet/templates/error/error_base.html
intranet/templates/error/static/403.html
intranet/templates/error/static/404.html
intranet/templates/error/static/429.html
intranet/templates/error/static/500.html
intranet/templates/error/static/501.html
intranet/templates/error/static/502.html
Expand Down
101 changes: 101 additions & 0 deletions intranet/templates/error/static/429.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<!-- {% load static %} -->
<!doctype html>
<html lang='en'>
<head>
<title>Intranet - Error</title>

<meta charset="UTF-8">
<meta name="description" content="The intranet for students and faculty at The Thomas Jefferson High School for Science and Technology in Alexandria, VA.">
<meta name="keywords" content="TJ Intranet, TJHSST Intranet, Thomas Jefferson Intranet, Thomas Jefferson High School for Science and Technology">
<meta name="author" content="The TJ Intranet Development Team">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">

<link rel="apple-touch-icon" href="/static/img/logos/logos/Icon-60.png">
<link rel="apple-touch-icon" sizes="76x76" href="/static/img/logos/logos/Icon-76.png">
<link rel="apple-touch-icon" sizes="120x120" href="/static/img/logos/logos/Icon-60@2x.png">
<link rel="apple-touch-icon" sizes="152x152" href="/static/img/logos/logos/Icon-76@2x.png">

<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width,initial-scale=1.0">

<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:100italic,400italic,700italic,100,400,700">
<style>
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;vertical-align:baseline;font-size:100%;font:inherit;margin:0;padding:0}

body {
font-family: "Open Sans", "Helvetica Neue", sans-serif;
font-size: 13px;
color: rgb(72, 72, 72);
background-color: rgb(242,242,244);
line-height: 1.4;
}

.center-wrapper {
text-align: center;
position: absolute;
top: 0;
bottom: 0;
left: 50%;
margin-left: -350px;
width: 700px;
min-height: 518px;
z-index: 10;
}

.center {
position: absolute;
width: 100%;
top: 50%;
margin-top: -200px;
}

.error {
padding-bottom: 10px;
border-bottom: 1px solid rgba(0,0,0,.1);
}

.logo {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABKCAYAAAA7fkOZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABqJJREFUeNrsXDFz2zYUhugM6aaxW9k77XG2ZLK8uZOtsVPIX2Bp62brF1j+BVLGTpY3Z5KyZYuytXe6M7N1VLZmah+cpztWJYkPwANF5vTuaJ0sEgI+PLz34QMEpQ5Wi3XOzs7u6PXiAEVQm0f0Z3TAIbiNjtbr9abX63XpzasDHkFs8vDw8HvEb8Z0bQ6YiNuGsVVPQBPim0MICRMyGFvVyf+XEuNHejk+4CNiKwL55fZNtNsDB3zkvDn/5ij/hhJjRokxPni1t83Im2/z/3hWcNOYeXXXUNiACpvv/pPCj37uhq7EM4ks6frErwtTXdg5Tujqe4KUUrtmRR9Q2zQud2gC/M+EpaTAa3q5MhSYUYV+LgB54TgidAV1A99Suaudcv+pepDu7+zUQYN97tHZ2iPTAlwe6SU2PDumZ68hoF0K9QA543JmFXWBgS7o+CFdl8AIrQTb1fkQoNFhsi3YFmQjwL5ACwD+BDY//+gaTiuB5gougJg3Y8+3iY2FwysU0L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WB7kkMjdKffQW+7yswOdF6xq/AqPgNgGJQ1TYJj0b5sAZoCngjooNcCt2TAolUJMaLAG2xLqgrfgfw8znQacrznko9g0FeAOU4a9ZOejQzEITa6HhtSo51nHozMsT3KdihY9vY7AV0bigi9EZTvruyMGKhg7haKTjsyeg5UssyzToo0Lnf5iGmE9WigmMjcd/FSvUM1mYWCvu5iG7rwKciRz4PU+b9g5hDR2FbV3/U3k33/6mfK2AzX5T80Z16f8aHApCvOVw8B8t57RoyttaRaA3H4cTikZkq2KQCng+C2v/Oz+BQMVV2B7ik6M+QQ8XofBhJFajLbuM2XY8FExvJxDjKARyzM3zcB8hiHp3L3q5nKr1V3/ZUbBxGRxnXTXNrholj2BHbf9dRwuYJlKaM75X/+qFmMefK/fw+MU8OBjSDrYFq4k8pEHYxkgbZm3VUsJF3xCI+c2J73hKQdQj7hUB+CFF4sC1huXOLVi0AWcfioOc9depoBbOLK+X/C6gQXpzanLvRaKBzrMT3zFLJWHxrc/Zea4DOc1oPyiUC8JZK1vnFnX25FHu4BvtSWR4y4kgb70OwicYDXTA17jP37Qt5ro6798ph2em7BboA+D5PNn7KTTriAs9fMaj6+sTJbdWE0yJ37V8BBgAF6dh132aSvQAAAABJRU5ErkJggg==);
background-repeat: no-repeat;
height: 74px;
width: 90px;
margin: auto;
}

h1 {
height: 37px;
line-height: 37px;
text-align: center;
font-weight: normal;
font-size: 25px;
text-align: center;
}

h2 {
font-size: 20px;
}
</style>
</head>
<body class="notransition">
<div class="center-wrapper">
<div class="center">
<div class="error">
<div class="logo"></div>
<h1>Too Many Requests - HTTP 429</h1>
<p>
You have made too many requests to Intranet in a short period of time.
<br>
Please wait a few minutes before trying again.
</p>
<br>
<p>
If this message continues to appear, please contact the
<a href="mailto:intranet@tjhsst.edu">Intranet Development Team</a>
</p>
</div>
</div>
</div>
</body>
</html>

0 comments on commit b809446

Please sign in to comment.