Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pages/playbooks/brickeye.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// OpenAdapt owns the stable public product path. The customer-specific service
// stays on its separate deployment boundary and private source repository.
export default function BrickeyePlaybookPage() {
return null
}

export function getServerSideProps({ res }) {
res.setHeader('X-Robots-Tag', 'noindex, nofollow')
return {
redirect: {
destination: 'https://playbooks.openadapt.ai/brickeye',
permanent: false,
},
}
}
16 changes: 16 additions & 0 deletions tests/playbooksRoute.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const assert = require('node:assert/strict')
const fs = require('node:fs')
const path = require('node:path')
const test = require('node:test')

const source = fs.readFileSync(
path.join(__dirname, '..', 'pages', 'playbooks', 'brickeye.js'),
'utf8'
)

test('the stable OpenAdapt Brickeye path redirects to the isolated service', () => {
assert.match(source, /https:\/\/playbooks\.openadapt\.ai\/brickeye/)
assert.match(source, /X-Robots-Tag/)
assert.match(source, /noindex, nofollow/)
assert.match(source, /permanent: false/)
})
Loading