fix for vite env prefixes

This commit is contained in:
fuzz
2023-11-15 15:55:59 +00:00
parent cef9d6de80
commit 26adf3ba7a
2 changed files with 3 additions and 2 deletions

View File

@@ -7,8 +7,8 @@ const router = express.Router();
const geoliteUrlBase = 'https://geolite.info/geoip/v2.1/city';
const geoliteAccountId = process.env.GEOLITE_ACCOUNT_ID;
const geoliteLicenseKey = process.env.GEOLITE_LICENSE_KEY;
const geoliteAccountId = process.env.VITE_GEOLITE_ACCOUNT_ID;
const geoliteLicenseKey = process.env.VITE_GEOLITE_LICENSE_KEY;
//https://stackoverflow.com/a/29268025
const ipRegex = new RegExp(/\b(?!(10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168))(?:(?:2(?:[0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9])\.){3}(?:(?:2([0-4][0-9]|5[0-5])|[0-1]?[0-9]?[0-9]))\b/);

View File

@@ -47,4 +47,5 @@ export default defineConfig({
},
},
plugins: [react(), splitVendorChunkPlugin()],
envDir: "backend"
});