# DNSMasq configuration for Crawailer test server
# Provides local DNS resolution for test domains

# Basic configuration
domain-needed
bogus-priv
no-resolv
no-poll

# Upstream DNS servers (when not handling locally)
server=8.8.8.8
server=8.8.4.4

# Cache size
cache-size=1000

# Log queries for debugging
log-queries

# Local domain mappings for test sites
address=/test.crawailer.local/127.0.0.1
address=/spa.test.crawailer.local/127.0.0.1
address=/ecommerce.test.crawailer.local/127.0.0.1
address=/api.test.crawailer.local/127.0.0.1
address=/docs.test.crawailer.local/127.0.0.1

# Additional subdomains for comprehensive testing
address=/staging.test.crawailer.local/127.0.0.1
address=/dev.test.crawailer.local/127.0.0.1
address=/blog.test.crawailer.local/127.0.0.1
address=/admin.test.crawailer.local/127.0.0.1

# Wildcard for dynamic subdomains
address=/.test.crawailer.local/127.0.0.1

# Interface binding
interface=lo
bind-interfaces

# DHCP range (if needed for containerized testing)
# dhcp-range=192.168.1.50,192.168.1.150,12h

# Enable DHCP logging
log-dhcp

# Don't read /etc/hosts
no-hosts

# Don't read /etc/resolv.conf
no-resolv

# Enable DNS rebind protection
stop-dns-rebind
rebind-localhost-ok

# Additional security
domain=test.crawailer.local
local=/test.crawailer.local/