Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding cache buster to index.html #445 #451

Merged
merged 10 commits into from
Dec 28, 2023
12 changes: 6 additions & 6 deletions aatp/peerbook_webrtc/admin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ test.describe('peerbook administration', () => {
const fromPeerbook = await page.$$('.from-peerbook')
expect(fromPeerbook.length).toBe(0)
})
test('try login with an invalid email', async ({ browser }) => {
test('try subscribe with an invalid email', async ({ browser }) => {
// TODO: rename to context2
context = await browser.newContext()
page = await context.newPage()
Expand All @@ -261,7 +261,7 @@ test.describe('peerbook administration', () => {
await sleep(100)
if (await page.locator('[data-test="twr-minimized"]').isVisible())
await page.click('[data-test="twr-minimized"]')
await page.keyboard.type('login')
await page.keyboard.type('subscribe')
await page.keyboard.press("Enter")
await sleep(100)
let twr = await getTWRBuffer(page)
Expand All @@ -279,9 +279,9 @@ test.describe('peerbook administration', () => {
twr = await getTWRBuffer(page)
expect(twr).toMatch(/Invalid credentials/)
})
test('try login with an invalid OTP', async () => {
test('try subscribe with an invalid OTP', async () => {
await sleep(100)
await page.keyboard.type('login')
await page.keyboard.type('subscribe')
await page.keyboard.press("Enter")
await sleep(100)
let twr = await getTWRBuffer(page)
Expand All @@ -299,9 +299,9 @@ test.describe('peerbook administration', () => {
twr = await getTWRBuffer(page)
expect(twr).toMatch(/Invalid credentials/)
})
test('login with a valid email & OTP', async () => {
test('subscribe with a valid email & OTP', async () => {
await sleep(100)
await page.keyboard.type('login')
await page.keyboard.type('subscribe')
await page.keyboard.press("Enter")
await sleep(100)
let twr = await getTWRBuffer(page)
Expand Down
19 changes: 18 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<head>
<meta charset="utf-8">
<title>Terminal 7</title>
<!-- Cache control meta tags -->
<meta http-equiv="Cache-Control" content="public, max-age=86400" />
<meta http-equiv="Expires" content="" id="expires-date" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no" />
<meta name="description" content="A touchable terminal multiplexer & emulator running over WebRTC">
<link rel="icon" href="/logo.svg" type="image/svg+xml">
Expand All @@ -13,7 +16,21 @@
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-title" content="Terminal7" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<script type="module" src="/main.ts"></script>
shech2 marked this conversation as resolved.
Show resolved Hide resolved

<!-- <script type="module" src="/main.ts"></script> -->

<script>
shech2 marked this conversation as resolved.
Show resolved Hide resolved
// Calculate expiration date (current date + 24 hours)
var expirationDate = new Date();
expirationDate.setTime(expirationDate.getTime() + (24 * 60 * 60 * 1000));

// Format the date as required by the Expires meta tag
var formattedExpirationDate = expirationDate.toUTCString();

// Set the Expires meta tag content
document.getElementById("expires-date").content = formattedExpirationDate;
</script>

</head>
<body>
<div id="terminal7">
Expand Down
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[headers]]
for = "/*"
[headers.values]
Cache-Control = "public, max-age=86400"
Loading