til
october 20263 notes
- How forward auth guards an app at the proxyForward auth is a pattern where the reverse proxy asks a separate auth service whether to let a request through before passing it on to the app.
For each request, the proxy sends the original headers (cookies, method, URL) to the auth service. A 2xx reply lets the request through, and anything else, such as a 401 or a redirect to the login page, goes straight back to the user.
The auth service can also send headers likeX-Forwarded-User, which the proxy copies onto the request, so the app learns who is signed in without running any login code of its own.
Traefik calls itforwardAuth, Caddy calls itforward_authand Nginx does the same thing withauth_request. That’s how tools like Authelia or oauth2-proxy can put one login in front of many apps.#auth #forward-auth #reverse-proxy #traefik #nginx - What "RFC" actually stands forProblem: I kept seeing references like “RFC 9110” in docs and treated them as serial numbers, never once asking what “RFC” stood for.
Solution: RFC stands for Request for Comments, the series of documents that defines how the internet works, from HTTP (RFC 9110) to email (RFC 5321). The humble name goes back to 1969, when RFC 1 was an informal note shared between ARPANET researchers, and it stuck even after RFCs became official standards. Most of them come out of the IETF today. Once published, an RFC never changes: fixes arrive as new RFCs that update or replace the old ones. Not every RFC is a standard either. Some are just informational, and a few are April Fools’ jokes, like RFC 1149, which describes sending internet traffic by carrier pigeon.#rfc #standards #internet - WordPress and Next.js can share one serverProblem: I thought WordPress and Next.js couldn’t share one server. I assumed each app brings its own web server (Apache for WordPress, Nginx for Next.js), that both need port 80, and that only one process can listen on it.
Solution: Neither app needs its own web server on port 80. WordPress needs PHP, which Nginx or Caddy run through PHP-FPM. Next.js ships its own Node server and runs on a separate port (3000 by default). One web server on port 80 sits in front and routes each request to the right app, some paths to WordPress and others to Next.js. Apache, Nginx or Caddy can all do this, so the choice was about effort and fit, never possibility.#server #nginx #nextjs #wordpress