Puas yog http host header suav nrog chaw nres nkoj?
Puas yog http host header suav nrog chaw nres nkoj?

Video: Puas yog http host header suav nrog chaw nres nkoj?

Video: Puas yog http host header suav nrog chaw nres nkoj?
Video: HTTP/2: The Sequel is Always Worse - James Kettle (albinowax) 2024, Hlis ntuj nqeg
Anonim

Cov Tus tswv thov taub hau qhia lub npe sau npe ntawm tus neeg rau zaub mov (rau virtual hosting), thiab (yeem) TCP chaw nres nkoj tus naj npawb uas tus neeg rau zaub mov tau mloog. Yog tsis muaj chaw nres nkoj yog muab, lub neej ntawd chaw nres nkoj rau qhov kev pab thov (piv txwv li, "80" rau ib qho HTTP URL) yog implied.

Hais txog qhov no, dab tsi yog tus tswv tsev hauv HTTP header?

Taw qhia hauv HTTP 1.1, ib host header yog ib qho thib peb ntawm cov ntaub ntawv uas koj tuaj yeem siv ntxiv rau qhov chaw nyob IP thiab tus lej chaw nres nkoj kom paub txog lub vev xaib tshwj xeeb lossis, raws li Microsoft hu nws, daim ntawv thov server. Piv txwv li, lub host header npe rau qhov URL http https://www.ideva.com yog www.ideva.com.

Tsis tas li ntawd, vim li cas ho xav tau tus tswv header? HTTP 1.1 kev thov feem ntau suav nrog a Tus tswv : taub hau , uas muaj lub hostname los ntawm tus neeg thov. Qhov no yog vim hais tias ib tus neeg rau zaub mov yuav siv ib qho chaw nyob IP lossis interface los txais kev thov rau ntau lub npe DNS hostnames. Cov Tus tswv : taub hau txheeb xyuas lub server thov los ntawm tus neeg siv khoom.

Ntawm no, puas yog http host header xav tau?

Nrog rau kev sib txuas tsis ruaj ntseg, tsis muaj tus neeg rau zaub mov lub npe qhia txhua, yog li cov host header tseem siv tau (thiab tsim nyog). A Host header teb yuav tsum raug xa mus rau tag nrho HTTP / 1.1 thov cov lus.

Dab tsi yog forward Host header?

X-Forwarded- Tus tswv (XFH) taub hau yog tus qauv de-facto taub hau rau kev txheeb xyuas qhov qub tus tswv tsev thov los ntawm tus neeg siv khoom hauv lub Tus tswv HTTP thov taub hau.

Pom zoo: