refetch stackoverflow rather than parsing supplied url

main
Lee Hanken 2022-11-05 02:49:07 +00:00
parent f7e7f86700
commit 5be51ddb7e
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ app.post('/', function(req, res) {
if (links) { if (links) {
ignore_links = (links === 'false'); ignore_links = (links === 'false');
} }
if (url && url.startsWith('https://stackoverflow.com/')) {
read_url(url, res, inline_title, ignore_links);
return;
}
if (!html) { if (!html) {
res.status(400).send("Please provide a POST parameter called html"); res.status(400).send("Please provide a POST parameter called html");
} else { } else {