docs.. examples
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
{
|
||||
"spa": "spa.html"
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
body {
|
||||
background-color: IndianRed;
|
||||
}
|
@ -1 +0,0 @@
|
||||
<h1>one</h1>
|
@ -1,8 +0,0 @@
|
||||
<head>
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
<h1>Single Page App</h1>
|
||||
<h2>Location: <span></span></h2>
|
||||
<script>
|
||||
document.querySelector('h2 span').textContent = window.location.pathname
|
||||
</script>
|
@ -101,12 +101,12 @@ test('mime', function(t){
|
||||
}})
|
||||
})
|
||||
|
||||
test('blacklist', function (t) {
|
||||
test('forbid', function (t) {
|
||||
t.plan(2)
|
||||
const app = localWebServer({
|
||||
log: { format: 'none' },
|
||||
static: { root: __dirname + '/fixture' },
|
||||
blacklist: [ /php$/, /html$/ ]
|
||||
forbid: [ /php$/, /html$/ ]
|
||||
})
|
||||
const server = launchServer(app, { leaveOpen: true })
|
||||
request('http://localhost:8100/something.php')
|
||||
|
Reference in New Issue
Block a user