forked from fkasler/cuddlephish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCaddyfile
45 lines (40 loc) · 1.18 KB
/
Caddyfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(proxy_upstream) {
# Enable access logging to STDOUT
log
# This is our list of naughty client User Agents that we don't want sniffing around our website
@ua_denylist {
header User-Agent curl*
header User-Agent Simple*
header User-Agent BBBike*
header User-Agent wget*
header User-Agent jorgee*
header User-Agent Python-urllib*
header User-Agent Lynx*
header User-Agent Slackbot-LinkExpanding*
}
header {
-Server
+X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"
+X-Content-Type-Options "nosniff"
}
# Respond with a 403 if the client has a User Agent defined in our naughty list
# Lot more you can do with this (e.g. redirect to seperate domain), check the docs
respond @ua_denylist "Forbidden" 403 {
close
}
# Main reverse proxy setup to our cuddlephish server binding 58082
reverse_proxy localhost:58082 {
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
}
}
#!!!JUST MODIFY THE DOMAIN AND API KEY BELOW!!!
myphishingsite.com *.myphishingsite.com {
tls {
dns gandi GANDI_API_KEY
}
# Use the proxy_upstream code snippet (defined above)
import proxy_upstream
}