[{"data":1,"prerenderedAt":261},["ShallowReactive",2],{"term-h\u002Fhttps":3,"related-h\u002Fhttps":240},{"id":4,"title":5,"acronym":6,"body":7,"category":219,"description":220,"difficulty":221,"extension":222,"letter":223,"meta":224,"navigation":225,"path":226,"related":227,"seo":233,"sitemap":234,"stem":237,"subcategory":238,"__hash__":239},"terms\u002Fterms\u002Fh\u002Fhttps.md","HTTPS","HyperText Transfer Protocol Secure",{"type":8,"value":9,"toc":213},"minimark",[10,15,19,23,26,30,202,206,209],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"HTTPS is HTTP but with a bodyguard. All the data flying between your browser and the website is scrambled so nobody can spy on it. That little padlock icon in your browser? That means HTTPS is on and your secrets are safe.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"HTTPS is HTTP layered over TLS (Transport Layer Security). It encrypts all traffic between client and server, verifies the server's identity via SSL\u002FTLS certificates, and prevents man-in-the-middle attacks. Default port is 443.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Redirect HTTP to HTTPS in Express\napp.use((req, res, next) => {\n  if (!req.secure) {\n    return res.redirect('https:\u002F\u002F' + req.headers.host + req.url);\n  }\n  next();\n});\n","javascript","",[38,39,40,49,94,121,175,181,192],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F Redirect HTTP to HTTPS in Express\n",[41,50,52,56,60,64,67,69,73,76,79,81,84,87,91],{"class":43,"line":51},2,[41,53,55],{"class":54},"sTEyZ","app",[41,57,59],{"class":58},"sMK4o",".",[41,61,63],{"class":62},"s2Zo4","use",[41,65,66],{"class":54},"(",[41,68,66],{"class":58},[41,70,72],{"class":71},"sHdIc","req",[41,74,75],{"class":58},",",[41,77,78],{"class":71}," res",[41,80,75],{"class":58},[41,82,83],{"class":71}," next",[41,85,86],{"class":58},")",[41,88,90],{"class":89},"spNyl"," =>",[41,92,93],{"class":58}," {\n",[41,95,97,101,105,108,110,112,115,118],{"class":43,"line":96},3,[41,98,100],{"class":99},"s7zQu","  if",[41,102,104],{"class":103},"swJcz"," (",[41,106,107],{"class":58},"!",[41,109,72],{"class":54},[41,111,59],{"class":58},[41,113,114],{"class":54},"secure",[41,116,117],{"class":103},") ",[41,119,120],{"class":58},"{\n",[41,122,124,127,129,131,134,136,139,143,145,148,151,153,156,158,161,163,165,167,170,172],{"class":43,"line":123},4,[41,125,126],{"class":99},"    return",[41,128,78],{"class":54},[41,130,59],{"class":58},[41,132,133],{"class":62},"redirect",[41,135,66],{"class":103},[41,137,138],{"class":58},"'",[41,140,142],{"class":141},"sfazB","https:\u002F\u002F",[41,144,138],{"class":58},[41,146,147],{"class":58}," +",[41,149,150],{"class":54}," req",[41,152,59],{"class":58},[41,154,155],{"class":54},"headers",[41,157,59],{"class":58},[41,159,160],{"class":54},"host",[41,162,147],{"class":58},[41,164,150],{"class":54},[41,166,59],{"class":58},[41,168,169],{"class":54},"url",[41,171,86],{"class":103},[41,173,174],{"class":58},";\n",[41,176,178],{"class":43,"line":177},5,[41,179,180],{"class":58},"  }\n",[41,182,184,187,190],{"class":43,"line":183},6,[41,185,186],{"class":62},"  next",[41,188,189],{"class":103},"()",[41,191,174],{"class":58},[41,193,195,198,200],{"class":43,"line":194},7,[41,196,197],{"class":58},"}",[41,199,86],{"class":54},[41,201,174],{"class":58},[11,203,205],{"id":204},"when-youll-hear-this","When You'll Hear This",[16,207,208],{},"\"Always use HTTPS in production.\" \u002F \"The browser is flagging the site as insecure because it's on HTTP.\"",[210,211,212],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":214},[215,216,217,218],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":204,"depth":51,"text":205},"networking","HTTPS is HTTP but with a bodyguard. All the data flying between your browser and the website is scrambled so nobody can spy on it.","beginner","md","h",{},true,"\u002Fterms\u002Fh\u002Fhttps",[228,229,230,231,232],"HTTP","TLS Handshake","SSL","Certificate","Port",{"title":5,"description":220},{"changefreq":235,"priority":236},"weekly",0.7,"terms\u002Fh\u002Fhttps",null,"HwV3NYEnzTNpnheEDx42oED8qInrC55HYA9kyhKgR_E",[241,246,250,254,257],{"title":231,"path":242,"acronym":238,"category":243,"difficulty":244,"description":245},"\u002Fterms\u002Fc\u002Fcertificate","security","intermediate","A certificate is a digital ID card for a website, signed by a trusted authority.",{"title":228,"path":247,"acronym":248,"category":219,"difficulty":221,"description":249},"\u002Fterms\u002Fh\u002Fhttp","HyperText Transfer Protocol","HTTP is the language your browser uses to ask websites for stuff. You type a URL, your browser shouts 'hey, give me that page!",{"title":232,"path":251,"acronym":238,"category":252,"difficulty":221,"description":253},"\u002Fterms\u002Fp\u002Fport","general","A port is like an apartment number on a building. Your computer is the building (localhost), and multiple services live inside.",{"title":230,"path":255,"acronym":230,"category":243,"difficulty":221,"description":256},"\u002Fterms\u002Fs\u002Fssl","SSL (Secure Sockets Layer) is the old-school version of the lock you see in your browser address bar.",{"title":229,"path":258,"acronym":259,"category":219,"difficulty":244,"description":260},"\u002Fterms\u002Ft\u002Ftls-handshake","Transport Layer Security Handshake","The TLS handshake is the 'hello, do we trust each other?' ceremony that happens before any HTTPS data flows.",1776518286014]