Development knowledge/Http

[Http] Http Referer ๋ž€ ๋ฌด์—‡์ผ๊นŒ?

yuri lee 2023. 2. 6. 19:49
๋ฐ˜์‘ํ˜•

Intro

์•ˆ๋…•ํ•˜์„ธ์š”. ์ด๋ฒˆ ์‹œ๊ฐ„์—๋Š” HTTP์˜ Referer์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

 

Http?

๋จผ์ € ๋“ค์–ด๊ฐ€๊ธฐ์— ์•ž์„œ Http์— ๋Œ€ํ•ด ๊ฐ„๋žตํ•˜ ์‚ดํŽด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค :)

HTTP๋Š” HTML ๋ฌธ์„œ์™€ ๊ฐ™์€ ๋ฆฌ์†Œ์Šค๋“ค์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ํ”„๋กœํ† ์ฝœ์ž…๋‹ˆ๋‹ค. ์ด ํ”„๋กœํ† ์ฝœ์€ ์ปดํ“จํ„ฐ ๋‚ด๋ถ€์—์„œ ํ˜น์€ ์ปดํ“จํ„ฐ ์‚ฌ์ด์—์„œ ๋ฐ์ดํ„ฐ์˜ ๊ตํ™˜ ๋ฐฉ์‹์„ ์ •์˜ํ•˜๋Š” ๊ทœ์น™์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. HTTP๋Š” ์›น์—์„œ ์ด๋ฃจ์–ด์ง€๋Š” ๋ชจ๋“  ๋ฐ์ดํ„ฐ ๊ตํ™˜์˜ ๊ธฐ์ดˆ์ด๋ฉฐ, ํด๋ผ์ด์–ธํŠธ-์„œ๋ฒ„ ํ”„๋กœํ† ์ฝœ์ด๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค.

 

Http Referer?

Http Header์˜ Http referer๋Š” ํ—ค๋”์— ๋‹ด๊ฒจ ์žˆ๋Š” ํ˜„์žฌ ํŽ˜์ด์ง€์— ์š”์ฒญํ•œ ์ด์ „ ํŽ˜์ด์ง€์˜ url ์ •๋ณด๋ฅผ ๋œปํ•ฉ๋‹ˆ๋‹ค.

 

Process

์‚ฌ์šฉ์ž๊ฐ€ ํ•ด๋‹น ๋งํฌ ํด๋ฆญ ์‹œ, Referer์— ๋งํฌ๊ฐ€ ํฌํ•จ๋œ ํŽ˜์ด์ง€์˜ ์ฃผ์†Œ๊ฐ€ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

 

Reasons for using Referer

๋ณดํ†ต referer๋Š” ๋กœ๊ทธ ๋ถ„์„์ด๋‚˜ ์ ‘๊ทผ ์ œ์–ด ํ˜น์€ ์บ์‹ฑ ์ตœ์ ํ™”์— ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ๋žŒ๋“ค์ด ์–ด๋””๋กœ๋ถ€ํ„ฐ ์™€์„œ, ์ ‘์† ์ค‘์ธ์ง€ ์•Œ๋ ค์ฃผ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.


https://developer.mozilla.org/ko/docs/Web/HTTP/Overview

 

HTTP ๊ฐœ์š” - HTTP | MDN

HTTP๋Š” HTML ๋ฌธ์„œ์™€ ๊ฐ™์€ ๋ฆฌ์†Œ์Šค๋“ค์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ํ”„๋กœํ† ์ฝœ์ž…๋‹ˆ๋‹ค. HTTP๋Š” ์›น์—์„œ ์ด๋ฃจ์–ด์ง€๋Š” ๋ชจ๋“  ๋ฐ์ดํ„ฐ ๊ตํ™˜์˜ ๊ธฐ์ดˆ์ด๋ฉฐ, ํด๋ผ์ด์–ธํŠธ-์„œ๋ฒ„ ํ”„๋กœํ† ์ฝœ์ด๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค. ํด๋ผ์ด์–ธํŠธ-์„œ๋ฒ„

developer.mozilla.org

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer

๋ฐ˜์‘ํ˜•