Remove unused Searxng tester script and update auth middleware (removed).

The Searxng tester script was deleted as it was unused and unnecessary. Commented out the auth middleware route layer in `src/routes.rs` to simplify the implementation while leaving a note for possible future customization.
This commit is contained in:
geoffsee
2025-05-27 12:39:10 -04:00
parent bb2073988f
commit 07b76723c2
2 changed files with 1 additions and 30 deletions

View File

@@ -1,29 +0,0 @@
import { SearxngService, type SearxngServiceConfig, type SearxngSearchResult } from 'searxng';
const config: SearxngServiceConfig = {
baseURL: 'https://search-engine-gsio.fly.dev',
defaultSearchParams: {
format: 'json',
lang: 'auto',
},
defaultRequestHeaders: {
'Content-Type': 'application/json',
},
};
const searxngService = new SearxngService(config);
async function performSearch(query) {
try {
const results = await searxngService.search(query);
console.log(results);
return results;
} catch (error) {
console.error('Search failed:', error);
}
}
const results = await performSearch('dogs');
console.log(JSON.stringify(results));

View File

@@ -47,7 +47,7 @@ pub fn create_router() -> Router {
.route("/api/webhooks", post(handle_webhooks_post))
// consume a stream resource
.route("/webhooks/:stream_id", get(handle_webhooks))
.route_layer(axum::middleware::from_fn(auth))
// .route_layer(axum::middleware::from_fn(auth)) // uncomment to implement your own auth
.route("/health", get(health))
.layer(
TraceLayer::new_for_http()