[{"data":1,"prerenderedAt":1050},["ShallowReactive",2],{"content-query-n4hqk2nrKg":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"layout":10,"crumb":11,"summary":12,"group":13,"order":14,"port":15,"updated":16,"cta":17,"related":25,"faq":44,"body":57,"_type":1043,"_id":1044,"_source":1045,"_file":1046,"_stem":1047,"_extension":1048,"sitemap":1049},"/localhost/8000","localhost",false,"","localhost:8000: Django, Python, Laravel and FastAPI dev port","localhost:8000 is the default port for Django runserver, python -m http.server, Laravel artisan serve and uvicorn. Fix 'refused to connect' and share it.","reference","localhost:8000","Django, python -m http.server, Laravel, FastAPI/uvicorn, Gatsby.","Web frameworks",4,8000,"2026-10-28",{"eyebrow":18,"title":19,"text":20,"to":21,"label":22,"secondaryTo":23,"secondaryLabel":24},"Webhook Relay","Receive webhooks on localhost:8000","relay forward gives your Django, Laravel or FastAPI app a permanent public webhook URL and delivers every request to localhost:8000, with logs and replay. Need to share the whole site instead? relay connect gives the port a stable HTTPS URL.","/docs/webhooks/internal/localhost/","Receive webhooks locally","/tunnels/","Explore Tunnels",[26,29,32,35,38,41],{"title":27,"to":28},"localhost:5000 (Flask)","/localhost/5000/",{"title":30,"to":31},"localhost:8080","/localhost/8080/",{"title":33,"to":34},"localhost:8888 (Jupyter)","/localhost/8888/",{"title":36,"to":37},"127.0.0.1 and the loopback address","/localhost/127-0-0-1/",{"title":39,"to":40},"400 vs 422","/http-errors/400-vs-422/",{"title":42,"to":43},"What is a webhook endpoint?","/glossary/webhook-endpoint/",[45,48,51,54],{"q":46,"a":47},"What is localhost:8000?","localhost:8000 is port 8000 on your own machine. It is the default for Django's runserver, Python's built-in python -m http.server, Laravel's php artisan serve, uvicorn and the FastAPI CLI, Gatsby's develop server and MkDocs.",{"q":49,"a":50},"Why does localhost:8000 refuse to connect?","No process is listening on port 8000. The dev server may not be running, may have exited on an error, or may be bound to a different port. In Docker, the server must listen on 0.0.0.0 and the port must be published with -p 8000:8000.",{"q":52,"a":53},"How do I run Django on a different port?","Pass the address to runserver, for example python manage.py runserver 8001, or python manage.py runserver 0.0.0.0:8001 to also listen on all interfaces.",{"q":55,"a":56},"Why does Django say DisallowedHost when I open it through a tunnel?","Django only serves hostnames listed in ALLOWED_HOSTS. Add the tunnel hostname to ALLOWED_HOSTS, and for form posts over HTTPS also add https:// plus that hostname to CSRF_TRUSTED_ORIGINS.",{"type":58,"children":59,"toc":1036},"root",[60,120,127,316,344,350,466,472,498,581,614,619,715,721,726,833,884,890,902,907,942,963,968,1002,1030],{"type":61,"tag":62,"props":63,"children":64},"element","p",{},[65,102,104,110,112,118],{"type":61,"tag":66,"props":67,"children":68},"strong",{},[69,76,78,84,86,92,94,100],{"type":61,"tag":70,"props":71,"children":73},"code",{"className":72},[],[74],{"type":75,"value":11},"text",{"type":75,"value":77}," is port 8000 on your own computer, and it's the default for Django's ",{"type":61,"tag":70,"props":79,"children":81},{"className":80},[],[82],{"type":75,"value":83},"runserver",{"type":75,"value":85},", Python's ",{"type":61,"tag":70,"props":87,"children":89},{"className":88},[],[90],{"type":75,"value":91},"python -m http.server",{"type":75,"value":93},", Laravel's ",{"type":61,"tag":70,"props":95,"children":97},{"className":96},[],[98],{"type":75,"value":99},"php artisan serve",{"type":75,"value":101},", uvicorn and FastAPI.",{"type":75,"value":103}," Gatsby and MkDocs use it too. Opening ",{"type":61,"tag":70,"props":105,"children":107},{"className":106},[],[108],{"type":75,"value":109},"http://localhost:8000",{"type":75,"value":111}," connects to whichever of these is running. ",{"type":61,"tag":70,"props":113,"children":115},{"className":114},[],[116],{"type":75,"value":117},"ERR_CONNECTION_REFUSED",{"type":75,"value":119}," means none of them is.",{"type":61,"tag":121,"props":122,"children":124},"h2",{"id":123},"what-runs-on-port-8000",[125],{"type":75,"value":126},"What runs on port 8000",{"type":61,"tag":128,"props":129,"children":130},"table",{},[131,155],{"type":61,"tag":132,"props":133,"children":134},"thead",{},[135],{"type":61,"tag":136,"props":137,"children":138},"tr",{},[139,145,150],{"type":61,"tag":140,"props":141,"children":142},"th",{},[143],{"type":75,"value":144},"Tool",{"type":61,"tag":140,"props":146,"children":147},{},[148],{"type":75,"value":149},"Default on 8000?",{"type":61,"tag":140,"props":151,"children":152},{},[153],{"type":75,"value":154},"Start command",{"type":61,"tag":156,"props":157,"children":158},"tbody",{},[159,182,203,223,252,273,294],{"type":61,"tag":136,"props":160,"children":161},{},[162,168,173],{"type":61,"tag":163,"props":164,"children":165},"td",{},[166],{"type":75,"value":167},"Django",{"type":61,"tag":163,"props":169,"children":170},{},[171],{"type":75,"value":172},"Yes (127.0.0.1:8000)",{"type":61,"tag":163,"props":174,"children":175},{},[176],{"type":61,"tag":70,"props":177,"children":179},{"className":178},[],[180],{"type":75,"value":181},"python manage.py runserver",{"type":61,"tag":136,"props":183,"children":184},{},[185,190,195],{"type":61,"tag":163,"props":186,"children":187},{},[188],{"type":75,"value":189},"Python static server",{"type":61,"tag":163,"props":191,"children":192},{},[193],{"type":75,"value":194},"Yes",{"type":61,"tag":163,"props":196,"children":197},{},[198],{"type":61,"tag":70,"props":199,"children":201},{"className":200},[],[202],{"type":75,"value":91},{"type":61,"tag":136,"props":204,"children":205},{},[206,211,215],{"type":61,"tag":163,"props":207,"children":208},{},[209],{"type":75,"value":210},"Laravel",{"type":61,"tag":163,"props":212,"children":213},{},[214],{"type":75,"value":194},{"type":61,"tag":163,"props":216,"children":217},{},[218],{"type":61,"tag":70,"props":219,"children":221},{"className":220},[],[222],{"type":75,"value":99},{"type":61,"tag":136,"props":224,"children":225},{},[226,231,235],{"type":61,"tag":163,"props":227,"children":228},{},[229],{"type":75,"value":230},"uvicorn / FastAPI",{"type":61,"tag":163,"props":232,"children":233},{},[234],{"type":75,"value":194},{"type":61,"tag":163,"props":236,"children":237},{},[238,244,246],{"type":61,"tag":70,"props":239,"children":241},{"className":240},[],[242],{"type":75,"value":243},"uvicorn main:app --reload",{"type":75,"value":245}," or ",{"type":61,"tag":70,"props":247,"children":249},{"className":248},[],[250],{"type":75,"value":251},"fastapi dev",{"type":61,"tag":136,"props":253,"children":254},{},[255,260,264],{"type":61,"tag":163,"props":256,"children":257},{},[258],{"type":75,"value":259},"Gatsby",{"type":61,"tag":163,"props":261,"children":262},{},[263],{"type":75,"value":194},{"type":61,"tag":163,"props":265,"children":266},{},[267],{"type":61,"tag":70,"props":268,"children":270},{"className":269},[],[271],{"type":75,"value":272},"gatsby develop",{"type":61,"tag":136,"props":274,"children":275},{},[276,281,285],{"type":61,"tag":163,"props":277,"children":278},{},[279],{"type":75,"value":280},"MkDocs",{"type":61,"tag":163,"props":282,"children":283},{},[284],{"type":75,"value":194},{"type":61,"tag":163,"props":286,"children":287},{},[288],{"type":61,"tag":70,"props":289,"children":291},{"className":290},[],[292],{"type":75,"value":293},"mkdocs serve",{"type":61,"tag":136,"props":295,"children":296},{},[297,302,307],{"type":61,"tag":163,"props":298,"children":299},{},[300],{"type":75,"value":301},"PHP built-in server",{"type":61,"tag":163,"props":303,"children":304},{},[305],{"type":75,"value":306},"By convention",{"type":61,"tag":163,"props":308,"children":309},{},[310],{"type":61,"tag":70,"props":311,"children":313},{"className":312},[],[314],{"type":75,"value":315},"php -S localhost:8000",{"type":61,"tag":62,"props":317,"children":318},{},[319,321,331,333,342],{"type":75,"value":320},"Flask uses ",{"type":61,"tag":322,"props":323,"children":324},"a",{"href":28},[325],{"type":61,"tag":70,"props":326,"children":328},{"className":327},[],[329],{"type":75,"value":330},"localhost:5000",{"type":75,"value":332}," and Jupyter uses ",{"type":61,"tag":322,"props":334,"children":335},{"href":34},[336],{"type":61,"tag":70,"props":337,"children":339},{"className":338},[],[340],{"type":75,"value":341},"localhost:8888",{"type":75,"value":343},".",{"type":61,"tag":121,"props":345,"children":347},{"id":346},"fix-localhost8000-refused-to-connect",[348],{"type":75,"value":349},"Fix \"localhost:8000 refused to connect\"",{"type":61,"tag":351,"props":352,"children":353},"ol",{},[354,381,399,440],{"type":61,"tag":355,"props":356,"children":357},"li",{},[358,363,365,371,373,379],{"type":61,"tag":66,"props":359,"children":360},{},[361],{"type":75,"value":362},"Is the server running?",{"type":75,"value":364}," Django prints ",{"type":61,"tag":70,"props":366,"children":368},{"className":367},[],[369],{"type":75,"value":370},"Starting development server at http://127.0.0.1:8000/",{"type":75,"value":372},". If the command exited, a migration error, import error or missing ",{"type":61,"tag":70,"props":374,"children":376},{"className":375},[],[377],{"type":75,"value":378},".env",{"type":75,"value":380}," value is usually shown just above.",{"type":61,"tag":355,"props":382,"children":383},{},[384,389,391,397],{"type":61,"tag":66,"props":385,"children":386},{},[387],{"type":75,"value":388},"Is it bound to the right address?",{"type":75,"value":390}," Django, uvicorn and Laravel bind to ",{"type":61,"tag":70,"props":392,"children":394},{"className":393},[],[395],{"type":75,"value":396},"127.0.0.1",{"type":75,"value":398}," by default. That's fine from your own browser, but not from Docker, WSL or another machine (see below).",{"type":61,"tag":355,"props":400,"children":401},{},[402,407,409,415,417,423,425,431,433,439],{"type":61,"tag":66,"props":403,"children":404},{},[405],{"type":75,"value":406},"Docker.",{"type":75,"value":408}," Run the server on ",{"type":61,"tag":70,"props":410,"children":412},{"className":411},[],[413],{"type":75,"value":414},"0.0.0.0",{"type":75,"value":416}," inside the container (",{"type":61,"tag":70,"props":418,"children":420},{"className":419},[],[421],{"type":75,"value":422},"runserver 0.0.0.0:8000",{"type":75,"value":424},", ",{"type":61,"tag":70,"props":426,"children":428},{"className":427},[],[429],{"type":75,"value":430},"uvicorn main:app --host 0.0.0.0",{"type":75,"value":432},") and publish it with ",{"type":61,"tag":70,"props":434,"children":436},{"className":435},[],[437],{"type":75,"value":438},"-p 8000:8000",{"type":75,"value":343},{"type":61,"tag":355,"props":441,"children":442},{},[443,448,450,456,458,464],{"type":61,"tag":66,"props":444,"children":445},{},[446],{"type":75,"value":447},"Got a page but a 400?",{"type":75,"value":449}," Django returns ",{"type":61,"tag":451,"props":452,"children":453},"em",{},[454],{"type":75,"value":455},"Bad Request (400)",{"type":75,"value":457}," when the hostname isn't in ",{"type":61,"tag":70,"props":459,"children":461},{"className":460},[],[462],{"type":75,"value":463},"ALLOWED_HOSTS",{"type":75,"value":465},". That's a config problem, not a connection one.",{"type":61,"tag":121,"props":467,"children":469},{"id":468},"find-and-free-a-busy-port-8000",[470],{"type":75,"value":471},"Find and free a busy port 8000",{"type":61,"tag":62,"props":473,"children":474},{},[475,481,483,489,491,496],{"type":61,"tag":70,"props":476,"children":478},{"className":477},[],[479],{"type":75,"value":480},"Error: That port is already in use.",{"type":75,"value":482}," (Django) or ",{"type":61,"tag":70,"props":484,"children":486},{"className":485},[],[487],{"type":75,"value":488},"[Errno 48] Address already in use",{"type":75,"value":490}," (Python on macOS) means an old server is still running, often a ",{"type":61,"tag":70,"props":492,"children":494},{"className":493},[],[495],{"type":75,"value":83},{"type":75,"value":497}," whose autoreloader child survived.",{"type":61,"tag":499,"props":500,"children":504},"pre",{"className":501,"code":502,"language":503,"meta":7,"style":7},"language-bash shiki shiki-themes github-dark","# macOS / Linux\nlsof -i :8000\nkill -9 $(lsof -ti :8000)\n","bash",[505],{"type":61,"tag":70,"props":506,"children":507},{"__ignoreMap":7},[508,520,542],{"type":61,"tag":509,"props":510,"children":513},"span",{"class":511,"line":512},"line",1,[514],{"type":61,"tag":509,"props":515,"children":517},{"style":516},"--shiki-default:#6A737D",[518],{"type":75,"value":519},"# macOS / Linux\n",{"type":61,"tag":509,"props":521,"children":523},{"class":511,"line":522},2,[524,530,536],{"type":61,"tag":509,"props":525,"children":527},{"style":526},"--shiki-default:#B392F0",[528],{"type":75,"value":529},"lsof",{"type":61,"tag":509,"props":531,"children":533},{"style":532},"--shiki-default:#79B8FF",[534],{"type":75,"value":535}," -i",{"type":61,"tag":509,"props":537,"children":539},{"style":538},"--shiki-default:#9ECBFF",[540],{"type":75,"value":541}," :8000\n",{"type":61,"tag":509,"props":543,"children":545},{"class":511,"line":544},3,[546,551,556,562,566,571,576],{"type":61,"tag":509,"props":547,"children":548},{"style":532},[549],{"type":75,"value":550},"kill",{"type":61,"tag":509,"props":552,"children":553},{"style":532},[554],{"type":75,"value":555}," -9",{"type":61,"tag":509,"props":557,"children":559},{"style":558},"--shiki-default:#E1E4E8",[560],{"type":75,"value":561}," $(",{"type":61,"tag":509,"props":563,"children":564},{"style":526},[565],{"type":75,"value":529},{"type":61,"tag":509,"props":567,"children":568},{"style":532},[569],{"type":75,"value":570}," -ti",{"type":61,"tag":509,"props":572,"children":573},{"style":538},[574],{"type":75,"value":575}," :8000",{"type":61,"tag":509,"props":577,"children":578},{"style":558},[579],{"type":75,"value":580},")\n",{"type":61,"tag":499,"props":582,"children":586},{"className":583,"code":584,"language":585,"meta":7,"style":7},"language-powershell shiki shiki-themes github-dark","# Windows\nnetstat -ano | findstr :8000\ntaskkill /PID \u003Cpid> /F\n","powershell",[587],{"type":61,"tag":70,"props":588,"children":589},{"__ignoreMap":7},[590,598,606],{"type":61,"tag":509,"props":591,"children":592},{"class":511,"line":512},[593],{"type":61,"tag":509,"props":594,"children":595},{},[596],{"type":75,"value":597},"# Windows\n",{"type":61,"tag":509,"props":599,"children":600},{"class":511,"line":522},[601],{"type":61,"tag":509,"props":602,"children":603},{},[604],{"type":75,"value":605},"netstat -ano | findstr :8000\n",{"type":61,"tag":509,"props":607,"children":608},{"class":511,"line":544},[609],{"type":61,"tag":509,"props":610,"children":611},{},[612],{"type":75,"value":613},"taskkill /PID \u003Cpid> /F\n",{"type":61,"tag":62,"props":615,"children":616},{},[617],{"type":75,"value":618},"Or pick another port:",{"type":61,"tag":499,"props":620,"children":622},{"className":501,"code":621,"language":503,"meta":7,"style":7},"python manage.py runserver 8001\npython -m http.server 8001\nphp artisan serve --port=8001\nuvicorn main:app --port 8001\n",[623],{"type":61,"tag":70,"props":624,"children":625},{"__ignoreMap":7},[626,649,670,693],{"type":61,"tag":509,"props":627,"children":628},{"class":511,"line":512},[629,634,639,644],{"type":61,"tag":509,"props":630,"children":631},{"style":526},[632],{"type":75,"value":633},"python",{"type":61,"tag":509,"props":635,"children":636},{"style":538},[637],{"type":75,"value":638}," manage.py",{"type":61,"tag":509,"props":640,"children":641},{"style":538},[642],{"type":75,"value":643}," runserver",{"type":61,"tag":509,"props":645,"children":646},{"style":532},[647],{"type":75,"value":648}," 8001\n",{"type":61,"tag":509,"props":650,"children":651},{"class":511,"line":522},[652,656,661,666],{"type":61,"tag":509,"props":653,"children":654},{"style":526},[655],{"type":75,"value":633},{"type":61,"tag":509,"props":657,"children":658},{"style":532},[659],{"type":75,"value":660}," -m",{"type":61,"tag":509,"props":662,"children":663},{"style":538},[664],{"type":75,"value":665}," http.server",{"type":61,"tag":509,"props":667,"children":668},{"style":532},[669],{"type":75,"value":648},{"type":61,"tag":509,"props":671,"children":672},{"class":511,"line":544},[673,678,683,688],{"type":61,"tag":509,"props":674,"children":675},{"style":526},[676],{"type":75,"value":677},"php",{"type":61,"tag":509,"props":679,"children":680},{"style":538},[681],{"type":75,"value":682}," artisan",{"type":61,"tag":509,"props":684,"children":685},{"style":538},[686],{"type":75,"value":687}," serve",{"type":61,"tag":509,"props":689,"children":690},{"style":532},[691],{"type":75,"value":692}," --port=8001\n",{"type":61,"tag":509,"props":694,"children":695},{"class":511,"line":14},[696,701,706,711],{"type":61,"tag":509,"props":697,"children":698},{"style":526},[699],{"type":75,"value":700},"uvicorn",{"type":61,"tag":509,"props":702,"children":703},{"style":538},[704],{"type":75,"value":705}," main:app",{"type":61,"tag":509,"props":707,"children":708},{"style":532},[709],{"type":75,"value":710}," --port",{"type":61,"tag":509,"props":712,"children":713},{"style":532},[714],{"type":75,"value":648},{"type":61,"tag":121,"props":716,"children":718},{"id":717},"open-localhost8000-from-another-device",[719],{"type":75,"value":720},"Open localhost:8000 from another device",{"type":61,"tag":62,"props":722,"children":723},{},[724],{"type":75,"value":725},"Listen on all interfaces, then use your LAN IP from the other device:",{"type":61,"tag":499,"props":727,"children":729},{"className":501,"code":728,"language":503,"meta":7,"style":7},"python manage.py runserver 0.0.0.0:8000\nuvicorn main:app --host 0.0.0.0 --port 8000\nphp artisan serve --host=0.0.0.0\npython -m http.server 8000 --bind 0.0.0.0\n",[730],{"type":61,"tag":70,"props":731,"children":732},{"__ignoreMap":7},[733,753,783,803],{"type":61,"tag":509,"props":734,"children":735},{"class":511,"line":512},[736,740,744,748],{"type":61,"tag":509,"props":737,"children":738},{"style":526},[739],{"type":75,"value":633},{"type":61,"tag":509,"props":741,"children":742},{"style":538},[743],{"type":75,"value":638},{"type":61,"tag":509,"props":745,"children":746},{"style":538},[747],{"type":75,"value":643},{"type":61,"tag":509,"props":749,"children":750},{"style":538},[751],{"type":75,"value":752}," 0.0.0.0:8000\n",{"type":61,"tag":509,"props":754,"children":755},{"class":511,"line":522},[756,760,764,769,774,778],{"type":61,"tag":509,"props":757,"children":758},{"style":526},[759],{"type":75,"value":700},{"type":61,"tag":509,"props":761,"children":762},{"style":538},[763],{"type":75,"value":705},{"type":61,"tag":509,"props":765,"children":766},{"style":532},[767],{"type":75,"value":768}," --host",{"type":61,"tag":509,"props":770,"children":771},{"style":532},[772],{"type":75,"value":773}," 0.0.0.0",{"type":61,"tag":509,"props":775,"children":776},{"style":532},[777],{"type":75,"value":710},{"type":61,"tag":509,"props":779,"children":780},{"style":532},[781],{"type":75,"value":782}," 8000\n",{"type":61,"tag":509,"props":784,"children":785},{"class":511,"line":544},[786,790,794,798],{"type":61,"tag":509,"props":787,"children":788},{"style":526},[789],{"type":75,"value":677},{"type":61,"tag":509,"props":791,"children":792},{"style":538},[793],{"type":75,"value":682},{"type":61,"tag":509,"props":795,"children":796},{"style":538},[797],{"type":75,"value":687},{"type":61,"tag":509,"props":799,"children":800},{"style":532},[801],{"type":75,"value":802}," --host=0.0.0.0\n",{"type":61,"tag":509,"props":804,"children":805},{"class":511,"line":14},[806,810,814,818,823,828],{"type":61,"tag":509,"props":807,"children":808},{"style":526},[809],{"type":75,"value":633},{"type":61,"tag":509,"props":811,"children":812},{"style":532},[813],{"type":75,"value":660},{"type":61,"tag":509,"props":815,"children":816},{"style":538},[817],{"type":75,"value":665},{"type":61,"tag":509,"props":819,"children":820},{"style":532},[821],{"type":75,"value":822}," 8000",{"type":61,"tag":509,"props":824,"children":825},{"style":532},[826],{"type":75,"value":827}," --bind",{"type":61,"tag":509,"props":829,"children":830},{"style":532},[831],{"type":75,"value":832}," 0.0.0.0\n",{"type":61,"tag":62,"props":834,"children":835},{},[836,838,843,845,851,853,859,861,867,869,875,877,883],{"type":75,"value":837},"For Django, add the IP to ",{"type":61,"tag":70,"props":839,"children":841},{"className":840},[],[842],{"type":75,"value":463},{"type":75,"value":844}," (with ",{"type":61,"tag":70,"props":846,"children":848},{"className":847},[],[849],{"type":75,"value":850},"DEBUG = True",{"type":75,"value":852}," and an empty list, only localhost names are allowed). Find the IP with ",{"type":61,"tag":70,"props":854,"children":856},{"className":855},[],[857],{"type":75,"value":858},"ipconfig getifaddr en0",{"type":75,"value":860}," (macOS), ",{"type":61,"tag":70,"props":862,"children":864},{"className":863},[],[865],{"type":75,"value":866},"hostname -I",{"type":75,"value":868}," (Linux) or ",{"type":61,"tag":70,"props":870,"children":872},{"className":871},[],[873],{"type":75,"value":874},"ipconfig",{"type":75,"value":876}," (Windows), then open ",{"type":61,"tag":70,"props":878,"children":880},{"className":879},[],[881],{"type":75,"value":882},"http://192.168.x.x:8000",{"type":75,"value":343},{"type":61,"tag":121,"props":885,"children":887},{"id":886},"share-localhost8000-and-receive-webhooks",[888],{"type":75,"value":889},"Share localhost:8000 and receive webhooks",{"type":61,"tag":62,"props":891,"children":892},{},[893,895,900],{"type":75,"value":894},"Port 8000 is where a lot of webhook handlers get written: a Django view for Stripe events, a Laravel route for Shopify, a FastAPI endpoint for GitHub. The provider needs a public URL, and ",{"type":61,"tag":70,"props":896,"children":898},{"className":897},[],[899],{"type":75,"value":5},{"type":75,"value":901}," isn't one.",{"type":61,"tag":62,"props":903,"children":904},{},[905],{"type":75,"value":906},"To receive webhooks, forward them to the handler route:",{"type":61,"tag":499,"props":908,"children":910},{"className":501,"code":909,"language":503,"meta":7,"style":7},"relay forward --bucket my-api http://localhost:8000/webhooks/stripe/\n",[911],{"type":61,"tag":70,"props":912,"children":913},{"__ignoreMap":7},[914],{"type":61,"tag":509,"props":915,"children":916},{"class":511,"line":512},[917,922,927,932,937],{"type":61,"tag":509,"props":918,"children":919},{"style":526},[920],{"type":75,"value":921},"relay",{"type":61,"tag":509,"props":923,"children":924},{"style":538},[925],{"type":75,"value":926}," forward",{"type":61,"tag":509,"props":928,"children":929},{"style":532},[930],{"type":75,"value":931}," --bucket",{"type":61,"tag":509,"props":933,"children":934},{"style":538},[935],{"type":75,"value":936}," my-api",{"type":61,"tag":509,"props":938,"children":939},{"style":538},[940],{"type":75,"value":941}," http://localhost:8000/webhooks/stripe/\n",{"type":61,"tag":62,"props":943,"children":944},{},[945,947,953,955,961],{"type":75,"value":946},"Webhook Relay gives the bucket a permanent public URL. Paste that into the provider dashboard, and every webhook is delivered to your local route and logged so you can replay it after fixing a bug. Remember to exempt the webhook view from CSRF (",{"type":61,"tag":70,"props":948,"children":950},{"className":949},[],[951],{"type":75,"value":952},"@csrf_exempt",{"type":75,"value":954},") and verify the ",{"type":61,"tag":322,"props":956,"children":958},{"href":957},"/glossary/webhook-signature/",[959],{"type":75,"value":960},"webhook signature",{"type":75,"value":962}," instead. Laravel needs the route excluded from CSRF verification too.",{"type":61,"tag":62,"props":964,"children":965},{},[966],{"type":75,"value":967},"To share the whole app with someone, use a tunnel:",{"type":61,"tag":499,"props":969,"children":971},{"className":501,"code":970,"language":503,"meta":7,"style":7},"relay connect --name my-django-app http://localhost:8000\n",[972],{"type":61,"tag":70,"props":973,"children":974},{"__ignoreMap":7},[975],{"type":61,"tag":509,"props":976,"children":977},{"class":511,"line":512},[978,982,987,992,997],{"type":61,"tag":509,"props":979,"children":980},{"style":526},[981],{"type":75,"value":921},{"type":61,"tag":509,"props":983,"children":984},{"style":538},[985],{"type":75,"value":986}," connect",{"type":61,"tag":509,"props":988,"children":989},{"style":532},[990],{"type":75,"value":991}," --name",{"type":61,"tag":509,"props":993,"children":994},{"style":538},[995],{"type":75,"value":996}," my-django-app",{"type":61,"tag":509,"props":998,"children":999},{"style":538},[1000],{"type":75,"value":1001}," http://localhost:8000\n",{"type":61,"tag":62,"props":1003,"children":1004},{},[1005,1007,1012,1014,1020,1022,1028],{"type":75,"value":1006},"For Django, add the tunnel hostname to ",{"type":61,"tag":70,"props":1008,"children":1010},{"className":1009},[],[1011],{"type":75,"value":463},{"type":75,"value":1013}," and ",{"type":61,"tag":70,"props":1015,"children":1017},{"className":1016},[],[1018],{"type":75,"value":1019},"https://\u003Chostname>",{"type":75,"value":1021}," to ",{"type":61,"tag":70,"props":1023,"children":1025},{"className":1024},[],[1026],{"type":75,"value":1027},"CSRF_TRUSTED_ORIGINS",{"type":75,"value":1029},", or logins and form posts fail with a 403 CSRF error.",{"type":61,"tag":1031,"props":1032,"children":1033},"style",{},[1034],{"type":75,"value":1035},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":544,"depth":544,"links":1037},[1038,1039,1040,1041,1042],{"id":123,"depth":522,"text":126},{"id":346,"depth":522,"text":349},{"id":468,"depth":522,"text":471},{"id":717,"depth":522,"text":720},{"id":886,"depth":522,"text":889},"markdown","content:localhost:8000.md","content","localhost/8000.md","localhost/8000","md",{"loc":4},1793199808942]