Skip to content

Commit

Permalink
Merge pull request jason5ng32#155 from jason5ng32/dev
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
jason5ng32 authored Apr 8, 2024
2 parents 31d8841 + 98c469b commit 539d823
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ export default (req, res) => {
return res.status(403).json({ error: 'What are you doing?' });
}

const hostname = referer ? new URL(referer).hostname : '';
const originalSite = hostname === 'ipcheck.ing' || hostname === 'www.ipcheck.ing';

const envConfigs = {
bingMap: process.env.BING_MAP_API_KEY,
ipInfo: process.env.IPINFO_API_TOKEN,
ipChecking: process.env.IPChecking_API_KEY,
keyCDN: process.env.KEYCDN_USER_AGENT,
originalSite: req.headers.referer && (new URL(req.headers.referer).hostname === 'ipcheck.ing' || new URL(req.headers.referer).hostname === 'www.ipcheck.ing'),
originalSite,
cloudFlare: process.env.CLOUDFLARE_API,
recaptcha: process.env.VITE_RECAPTCHA_SITE_KEY && process.env.RECAPTCHA_SECRET_KEY
};
Expand Down

0 comments on commit 539d823

Please sign in to comment.