mirror of
https://github.com/benbusby/whoogle-search
synced 2024-11-01 03:20:30 +00:00
0c0ebb8917
The implementation of POST search support comes with a few benefits. The most apparent is the avoidance of search queries appearing in web server logs -- instead of the prior GET approach (i.e. /search?q=my+search+query), using POST requests with the query stored in the request body creates logs that simply appear as "/search". Since a lot of relative links are generated in the results page, I came up with a way to generate a unique key at run time that is used to encrypt any query strings before sending to the user. This benefits both regular text queries as well as fetching of image links and means that web logs will only show an encrypted string where a link or query string might slip through. Unfortunately, GET search requests still need to be supported, as it doesn't seem that Firefox (on iOS) supports loading search engines by their opensearch.xml file, but instead relies on manual entry of a search query string. Once this is updated, I'll probably remove GET request search support.
63 lines
3.7 KiB
HTML
63 lines
3.7 KiB
HTML
<html>
|
|
<head>
|
|
<link rel="apple-touch-icon" sizes="57x57" href="/static/img/favicon/apple-icon-57x57.png">
|
|
<link rel="apple-touch-icon" sizes="60x60" href="/static/img/favicon/apple-icon-60x60.png">
|
|
<link rel="apple-touch-icon" sizes="72x72" href="/static/img/favicon/apple-icon-72x72.png">
|
|
<link rel="apple-touch-icon" sizes="76x76" href="/static/img/favicon/apple-icon-76x76.png">
|
|
<link rel="apple-touch-icon" sizes="114x114" href="/static/img/favicon/apple-icon-114x114.png">
|
|
<link rel="apple-touch-icon" sizes="120x120" href="/static/img/favicon/apple-icon-120x120.png">
|
|
<link rel="apple-touch-icon" sizes="144x144" href="/static/img/favicon/apple-icon-144x144.png">
|
|
<link rel="apple-touch-icon" sizes="152x152" href="/static/img/favicon/apple-icon-152x152.png">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/img/favicon/apple-icon-180x180.png">
|
|
<link rel="icon" type="image/png" sizes="192x192" href="/static/img/favicon/android-icon-192x192.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/img/favicon/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="96x96" href="/static/img/favicon/favicon-96x96.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/img/favicon/favicon-16x16.png">
|
|
<link rel="manifest" href="/static/img/favicon/manifest.json">
|
|
<meta name="msapplication-TileColor" content="#ffffff">
|
|
<meta name="msapplication-TileImage" content="/static/img/favicon/ms-icon-144x144.png">
|
|
<script type="text/javascript" src="/static/js/controller.js"></script>
|
|
<link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Shoogle Search">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="/static/css/main.css">
|
|
<title>Shoogle Search</title>
|
|
</head>
|
|
<body id="main" style="display: none; background-color: {{ bg }}">
|
|
<div class="search-container">
|
|
<img class="logo" src="/static/img/logo.png">
|
|
<form action="/search" method="post">
|
|
<div class="search-fields">
|
|
<input type="text" name="q" id="search-bar">
|
|
<input type="submit" id="search-submit" value="Submit">
|
|
</div>
|
|
</form>
|
|
<br/>
|
|
<button id="config-collapsible" class="collapsible">Configuration</button>
|
|
<div class="content">
|
|
<div class="config-fields">
|
|
<div class="config-div">
|
|
<!-- TODO: Add option to regenerate user agent? -->
|
|
<span class="ua-span">User Agent: {{ ua }}</span>
|
|
</div>
|
|
<div class="config-div">
|
|
<label for="config-near">Near: </label>
|
|
<input type="text" name="config-near" id="config-near" placeholder="City Name">
|
|
</div>
|
|
<div class="config-div">
|
|
<label for="config-nojs">Show NoJS Links: </label>
|
|
<input type="checkbox" name="config-nojs" id="config-nojs">
|
|
</div>
|
|
<div class="config-div">
|
|
<label for="config-dark">Dark Mode: </label>
|
|
<input type="checkbox" name="config-dark" id="config-dark">
|
|
</div>
|
|
<div class="config-div">
|
|
<button type="submit" id="config-submit">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|