remove logs in domain middleware
This commit is contained in:
parent
36d9daca52
commit
d175fe601a
1 changed files with 0 additions and 2 deletions
|
@ -3,11 +3,9 @@ interface RequestParameters { r: pogo.Request, h: pogo.Toolkit }
|
||||||
|
|
||||||
export default ({ r, h }: RequestParameters, domains: string[] | string, handler: any) => {
|
export default ({ r, h }: RequestParameters, domains: string[] | string, handler: any) => {
|
||||||
if (domains.includes(r.host) || domains.includes("*")) {
|
if (domains.includes(r.host) || domains.includes("*")) {
|
||||||
console.log("Call actual Handler")
|
|
||||||
return handler(r, h)
|
return handler(r, h)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log("Throw Error")
|
|
||||||
return h.response({
|
return h.response({
|
||||||
error: "This Site/Fuction doesn't exist or is not available on the current domain."
|
error: "This Site/Fuction doesn't exist or is not available on the current domain."
|
||||||
}).code(404)
|
}).code(404)
|
||||||
|
|
Loading…
Add table
Reference in a new issue