Hi everyone! These is what i came up with as a an Nginx alternative to Node.js proxy config with default options for solr. Any feedback is appreciated. It is still not reasonbly safe in case somebody would decide to retrieve the whole index using options like &start=0&rows=1.
location ^~ /site/solr/collection2/select {
if ($arg_qt) {
return 406; #Not acceptable
}
if ($arg_stream) {
return 406; #Not acceptable
}
if ($request_method = POST ) {
return 405; #method not allowed
}
proxy_pass
http://localhost:8983/solr/collection2/select;
# TODO prepend &start=0&rows=1
}