Tangible Bytes

A Web Developer’s Blog

Claude Code: Open Permissions, Hard Limits

I recently started using Claude Code but I found the permission prompts both hard work and unreliable.

Trying to work out what I was agreeing to was hard work - and all too often the agent managed to do things I hadn’t wanted.

So I turned the inbuilt soft limits off (--dangerously-skip-permissions) and put Claude in a container I call a devbox. Inside the devbox Claude can do whatever it likes. The container decides what can actually be written, where it can connect to, and which credentials it holds, and Claude can’t change any of that from inside.

Read more ...

Laravel Fortify - making 2fa required

By default Fortify makes 2FA optional

This article details how to make it required - using email by default with TOTP optional.

This assumes the Breeze → Fortify migration is done: feature flag on, trait on User, two-factor columns migrated.

0 . Make sure domains match

I’m using a multisite setup and need to ensure the public and auth route handlers dont overlap

in routes/web.php I added

$adminDomain = preg_quote((string) config('app.admin_domain'), '/');
$publicSiteDomain = "(?!{$adminDomain}$)[a-z0-9.-]+";

Route::domain('{site:domain}')->where(['site' => $publicSiteDomain])->group(function () {

and in phpunit.xml I make sure the default domain is defined

Read more ...

Digital Ocean Kubernetes Load Balancer Configuration

At work I’m using Digital Ocean and their managed Kubernetes offering - DOKS

The cluster is almost entirely managed via Helm charts - and even system components that are installed via the Digital Ocean “1 Click” installers are Helm charts really.

Recently we ran into a problem where we needed real IP addresses available to our application - but these were being lost to the load balancer - and I needed to configure Proxy Protocol to re-enable them.

Read more ...

Laravel Redis Route Binding

I setup Laravel with Redis and made sure all my articles were cached, and still saw a lot of database traffic.

All the route bound parameters get magically injected - but of course behind the scenes these are looked up in the database.

Although these are simple queries that run pretty fast - a lof of them are repeated very frequently so can be efficiently cached.

Read more ...