[mod] separate index and search routes

This makes it easier to separately handle search and index requests
from a web server or from a reverse proxy.

If a request to index contains a query, a permanent redirect HTTP response
is returned. This should give some level of backwards compatibility
for users that have set a searx instance in their browser's search bar.
This commit is contained in:
Marc Abonce Seguin 2019-07-29 21:25:05 -07:00
parent 45f58a4a2a
commit 8d71420b45
17 changed files with 70 additions and 42 deletions

View file

@ -9,7 +9,7 @@ function loadNextPage() {
$('#pagination').html('<div class="loading-spinner"></div>');
$.ajax({
type: "POST",
url: './',
url: $('#search_form').prop('action'),
data: formData,
dataType: 'html',
success: function(data) {