Deploy Codette Proxy to Railway (FREE)
Why You Need This
HuggingFace blocks iframe embedding with X-Frame-Options: deny. This proxy server:
- β Strips the blocking header
- β Relays requests to HF Space
- β Allows iframe embedding on horizoncorelabs.studio
Step 1: Deploy to Railway (2 minutes)
- Go to https://railway.app and sign up (with GitHub)
- Click "Create New Project" β "Deploy from GitHub Repo"
- Connect your
codette-cleanrepo (or this branch) - Railway auto-detects
package.jsonand deploys
Your proxy URL will look like:
https://codette-proxy-xxxxxx.railway.app
(Railway generates a random subdomain)
Step 2: Update horizoncorelabs.studio Embed
Replace your embed code with:
<iframe
src="https://YOUR-RAILWAY-URL/spaces/Raiff1982/codette-ai"
style="width: 100%; max-width: 740px; height: 640px; border: none; border-radius: 20px; margin: 20px auto; display: block;"
title="Codette AI"
></iframe>
Replace YOUR-RAILWAY-URL with your actual Railway domain (without https://).
Step 3: Test
- Reload horizoncorelabs.studio
- Codette widget should now load in the iframe
- Test sending a message
Alternative: Fly.io (Also Free)
If Railway doesn't work:
- Install Fly CLI:
npm install -g @fly/cli - In
codette-cleanfolder:fly launch fly deploy- Get your URL:
fly status
Update the embed code with your Fly URL.
How the Proxy Works
horizoncorelabs.studio
β (iframe request)
Railway Proxy (YOUR-RAILWAY-URL)
β (proxies request, strips X-Frame-Options)
HuggingFace Space (HF_SPACE_URL)
β (returns response without blocking header)
horizoncorelabs.studio
β (iframe renders successfully)
If You Need a Custom Domain
You can add a custom domain to Railway:
- In Railway dashboard, go to Settings β Domains
- Add
api.horizoncorelabs.studioor similar - Update your embed code to use that domain
Then horizoncorelabs.studio will proxy through its own subdomain instead of Railway's.
Next Steps
- Deploy to Railway (takes ~60 seconds)
- Copy your Railway URL
- Update embed code on Squarespace
- Reload and test
Let me know when you've deployed!