Bitpath

Boss lesson · Unit 04

It works on my machine

A diagnosis ladder: dig, ping, curl -v, status codes and CORS

13 exercisesabout 3 min

What you practise

  • A diagnosis ladder: ping, dig, curl -v, status code, headers
  • Timeouts vs refused vs reset
  • Reading a curl -v transcript
  • The same-origin policy and CORS
  • Load balancers and reverse proxies in the path

Try a question from this lesson

Pick one

"The site is down" can mean several different failures. Which observation points at DNS rather than at the server?

The ideas

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

One tool per question

Debug from the bottom up. Each tool answers one question, and the first "no" tells you which layer to look at.

A silent ping is a clue rather than proof: many networks block it on purpose.

dig example.com       name resolves?
ping 203.0.113.9      machine reachable?
curl -v https://...   TCP? TLS? status?

Concept

Same origin, and CORS

An origin is a scheme, a host and a port together. A page's JavaScript may freely read responses from its own origin only.

Another origin can opt in by answering with an Access-Control-Allow-Origin header. That is CORS. The browser enforces the rule; tools like curl do not.

origin = scheme + host + port

https://app.example.com
https://api.example.com   other host
http://app.example.com    other scheme

10 more exercises in the app

  • 1× match the pairs
  • 5× multiple choice
  • 1× true or false
  • 1× fill the blanks
  • 1× type the answer
  • 1× order the lines

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy