tmpfs.tech · all tracks · Web & Deploy

Map User-Agent to a Variable

Web & Deploy · pro · solved in-browser (no VM needed) · 3 tiered hints

Write /etc/nginx/conf.d/mobile-map.conf using nginx's map directive: map $http_user_agent $is_mobile { ... } with a default 0; entry and a case-insensitive pattern (~*) matching android or iphone that sets the value to 1. (Authored config, graded structurally — the engine isn't run here.)

▶ Start this challenge

Nobody has solved this one yet — be the first clear on the leaderboard.

How it works

Open the challenge and an in-page editor appears — write your answer and tmpfs.tech grades it server-side against the same checks a real box would run. No VM, no install, no signup needed to try.

More Web & Deploy challenges

Serve and deploy real web apps: nginx, ports, reverse proxies and rollouts.

See all Web & Deploy challenges →

FAQ

Is it free? Yes — play as a guest, no signup required to start.

Do I need to install anything? No. Everything runs in your browser.

How is it graded? Automatically and deterministically — your work is checked against the exact rules the live box would apply.