Skip to content
WasFor
Back to home
Documentation/User panel

Security controls

Access controls in WasFor are per-site and per-account. This page covers the controls you can enable from a site's Settings tab, plus account-level protections.

Basic authentication

Add a username and password in front of a site or a single path — useful for staging environments and internal tools.

text
Realm: Staging
User: acme
Password: <generated>
Protected paths: / (whole site)

WasFor writes an htpasswd file outside the document root and adds the auth_basic directives to the vhost. Passwords are hashed with bcrypt.

IP allow and deny lists

ModeBehaviour
Allow listOnly listed addresses may connect
Deny listListed addresses are blocked; everyone else may connect

Both modes accept single addresses and CIDR blocks:

text
203.0.113.10
198.51.100.0/24
2001:db8::/48

Combine a deny list with Basic Auth for admin paths: the list stops noisy scanners, the password stops the rest.

If you enable an allow list, add your own address first. The panel offers a one-click "add my current IP" action to avoid locking yourself out.

Maintenance mode

Maintenance mode returns 503 with a Retry-After header while letting chosen addresses through:

http
HTTP/1.1 503 Service Unavailable
Retry-After: 3600

Use it during migrations and deploys that cannot be zero-downtime. The custom maintenance page is editable per site.

Rate limiting

Rate limits protect login forms, APIs and expensive endpoints.

FieldExampleMeaning
Zone/api/Path prefix
Rate10r/sRequests per second
Burst20Queue above the rate
Action429Status returned when exceeded
nginx
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;

location /api/ {
    limit_req zone=api burst=20 nodelay;
}

Start generous and tighten using traffic logs. An aggressive limit on a shared egress IP can affect legitimate users.

Hotlink protection blocks other sites from embedding your images and media:

text
Allowed referrers: example.com, *.example.com
Blocked extensions: jpg, jpeg, png, gif, webp, mp4

Requests with no referrer are allowed by default so direct navigation and privacy-focused browsers keep working.

Reverse proxy

Proxy a path or a subdomain to an application listening on a local port — Node.js, Python, Go or a container:

text
Source: api.example.com
Target: http://127.0.0.1:3000
WebSocket: enabled

WasFor writes the proxy_pass block, forwards Host, X-Real-IP, X-Forwarded-For and X-Forwarded-Proto, and keeps TLS termination at the edge. Bind the upstream to 127.0.0.1, never to a public interface.

Account-level protections

ControlRecommendation
Two-factor authenticationRequired for owner and admin roles
Session timeout30 minutes idle for admin roles
Active sessionsReview and revoke unknown devices monthly
Password policy14+ characters, checked against breach lists
API keysScoped, rotated every 90 days
Login alertsEmail on new device or country

Headers WasFor sets

http
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin-when-cross-origin

Add a Content-Security-Policy per site under Settings → Headers once you know which origins your application needs. Start in report-only mode, review violations, then enforce.

Incident checklist

  1. Revoke suspicious sessions and API keys.
  2. Rotate database and mailbox passwords.
  3. Enable maintenance mode if the site is serving malicious content.
  4. Pull the access and error logs for the affected window.
  5. Restore from the last known-good snapshot if files were modified.
  6. Open a ticket with the timeline and evidence — see AI & support.
Last updated: 2026-12-01