Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 586b6cdee8 | |||
| f1b8ee1188 | |||
| 88cc214ddb | |||
| 25facb995f | |||
| 7b01924055 |
@@ -15,7 +15,6 @@ const nextConfig = {
|
||||
pagesBufferLength: 2,
|
||||
},
|
||||
experimental: {
|
||||
optimizeCss: true,
|
||||
staleTimes: {
|
||||
dynamic: 0,
|
||||
static: 30,
|
||||
@@ -568,6 +567,7 @@ resolvedConfig = withSentryConfig(
|
||||
disableClientWebpackPlugin: true,
|
||||
autoInstrumentServerFunctions: false,
|
||||
autoInstrumentMiddleware: false,
|
||||
autoInstrumentAppDirectory: false,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
"prepare": "husky",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"version": "2.2.69",
|
||||
"version": "2.2.71",
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
|
||||
@@ -6,13 +6,14 @@ module.exports = async (browser, context) => {
|
||||
const page = await browser.newPage();
|
||||
// Using LHCI_URL or TARGET_URL if available
|
||||
const targetUrl =
|
||||
process.env.LHCI_URL || process.env.TARGET_URL || 'https://testing.klz-cables.com';
|
||||
process.env.LHCI_URL || process.env.TARGET_URL || 'https://testing.e-tib.com';
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
console.log(`🔑 LHCI Auth: Setting gatekeeper cookie for ${new URL(targetUrl).hostname}...`);
|
||||
console.log(`🔑 LHCI Auth: Setting gatekeeper cookie (${authCookieName}) for ${new URL(targetUrl).hostname}...`);
|
||||
|
||||
await page.setCookie({
|
||||
name: 'klz_gatekeeper_session',
|
||||
name: authCookieName,
|
||||
value: gatekeeperPassword,
|
||||
domain: new URL(targetUrl).hostname,
|
||||
path: '/',
|
||||
|
||||
@@ -19,6 +19,7 @@ const targetUrl =
|
||||
'http://localhost:3000';
|
||||
const limit = process.env.PAGESPEED_LIMIT ? parseInt(process.env.PAGESPEED_LIMIT) : 20; // Default limit to avoid infinite runs
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
const authCookieName = process.env.AUTH_COOKIE_NAME || 'etib_gatekeeper_session';
|
||||
|
||||
async function main() {
|
||||
console.log(`\n🚀 Starting PageSpeed test for: ${targetUrl}`);
|
||||
@@ -32,7 +33,7 @@ async function main() {
|
||||
// We might need to bypass gatekeeper for the sitemap fetch too
|
||||
const response = await axios.get(sitemapUrl, {
|
||||
headers: {
|
||||
Cookie: `klz_gatekeeper_session=${gatekeeperPassword}`,
|
||||
Cookie: `${authCookieName}=${gatekeeperPassword}`,
|
||||
},
|
||||
validateStatus: (status) => status < 400,
|
||||
});
|
||||
@@ -77,7 +78,7 @@ async function main() {
|
||||
// Handle authentication for staging/testing
|
||||
// Lighthouse can set cookies via --collect.settings.extraHeaders
|
||||
const extraHeaders = JSON.stringify({
|
||||
Cookie: `klz_gatekeeper_session=${gatekeeperPassword}`,
|
||||
Cookie: `${authCookieName}=${gatekeeperPassword}`,
|
||||
});
|
||||
|
||||
// Detect Chrome path from Puppeteer installation if not provided
|
||||
|
||||
Reference in New Issue
Block a user