Commit 3de77cee authored by Mike Cardwell's avatar Mike Cardwell

Move dns test zone into the config file

parent be61d164
export const backendUrl = 'http://localhost:3333';
export const dnsTestZone = 'ept.emailprivacytester.com';
export const expireTests = 86400000 * 7;
export const frontendDomain = 'emailprivacytester.com';
export const frontendUrl = 'http://localhost:3000';
......
......@@ -64,7 +64,7 @@ export const attachments = [
},
];
export const html = ({ code, base, frontendDomain }) => {
export const html = ({ code, base, dnsTestZone, frontendDomain }) => {
return (
<html lang="en-GB" manifest={ `${base}manifest` }>
......@@ -188,14 +188,14 @@ export const html = ({ code, base, frontendDomain }) => {
{/* Anchor DNS Prefetch Test */}
<a href={ `http://${code}.anchor-test.ept.${frontendDomain}` }
<a href={ `http://${code}.anchor-test.${dnsTestZone}` }
/>
{/* Link DNS Prefetch Test */}
<link
rel = "dns-prefetch"
href = { `http://${code}.link-test.ept.${frontendDomain}` }
href = { `http://${code}.link-test.${dnsTestZone}` }
/>
{/* Link Prefetch Test */}
......
#!/usr/bin/env babel-node
import os from 'os';
import { Tail } from 'tail';
import { frontendDomain } from './frontend/config';
import API from './frontend/lib/api';
import os from 'os';
import { Tail } from 'tail';
import { dnsTestZone } from './backend/config';
import API from './frontend/lib/api';
const queryLogPath = '/var/log/bind/query.log';
const rx = new RegExp(
`^\\S+ \\S+ .*: client (\\S+?)#\\d+.*?: query: ([a-zA-Z0-9]+)\\.(anchor|link)-test\\.ept\\.${frontendDomain.replace(/\./g, '\\.')} IN A(?:AAA)? `,
`^\\S+ \\S+ .*: client (\\S+?)#\\d+.*?: query: ([a-zA-Z0-9]+)\\.(anchor|link)-test\\.${dnsTestZone.replace(/\./g, '\\.')} IN A(?:AAA)? `,
'i'
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment