Skip to content

Commit 637aaee

Browse files
authored
Update index.ts
1 parent 7914bd5 commit 637aaee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getScreenshot } from "./_lib/puppeteer";
22

33
module.exports = async (req, res) => {
4+
if (process.env.demo == "yes") return res.status(403).send("The public instance of this API is now unavailable. You can deploy your own instance for free on Vercel here: https://s.vercel.app/deploy.");
45
if (!req.query.url) return res.status(400).send("No url query specified.");
56
if (!checkUrl(req.query.url)) return res.status(400).send("Invalid url query specified.");
67
try {
@@ -22,4 +23,3 @@ function checkUrl(string, hostname) {
2223
return false;
2324
}
2425
return true;
25-
}

0 commit comments

Comments
 (0)