
net::ERR_BLOCKED_BY_ORB
๋ฌธ์ ์ํฉ
๋ก์ปฌ ํ๊ฒฝ์์ GeoServer์ WMS ๋ ์ด์ด๋ฅผ Leaflet์ผ๋ก ๋์ฐ๋ ์์
์ ํ๋ ์ค,
๋ค์๊ณผ ๊ฐ์ ์ค์ ์ผ๋ก ํ๋ก์๋ฅผ ๊ตฌ์ฑํ๋ค.
๊ทธ๋ฐ๋ฐ ๋ธ๋ผ์ฐ์ ์ฝ์์ ์ด๋ฐ ์๋ฌ๊ฐ ๊ณ์ ๋ฐ์ํ๋ค.
project-geoserver-url: http://์์ดํผ1:8080/proxy/wms
GeoServer ์ง์ ์ ์(์ง์ค์๋ฒ์์ดํผ:ํฌํธ/geoserver/...)์ ์ ์์ธ๋ฐ,
Spring Proxy๋ฅผ ๊ฑฐ์น๋ฉด ๋ชจ๋ WMS ํ์ผ ์์ฒญ์ด ์คํจํ๋ค.
ํ๊ฒฝ ๊ตฌ์ฑ ์์ฝ
- Spring Boot (๊ฐ๋ฐ์๋ฒ): localhost:8080
- GeoServer (์ค์๋ฒ): ์์ดํผ1:ํฌํธ
- Leaflet ์ง๋: WMS Layer ์์ฒญ
- ProxyController: /proxy/wms, /proxy/ows ๋ก GeoServer ์ค๊ณ
๋ฌธ์ ์ ์์ธ
๋ฌธ์ ์ ํต์ฌ์ ํ๋ก์ ๋ฃจํ(Proxy Loop) ์ด๋ค.
ํ์ฌ ์ค์ ์ ๋ณด๋ฉด, Spring์ด ์คํ๋๋ ์๋ฒ ์ฃผ์(8080)๋ฅผ ๋ค์ ๊ฐ๋ฆฌํค๊ณ ์๋ค.
์ฆ, ์ด๋ฐ ํ๋ฆ์ด ๋ง๋ค์ด์ง๋ค:
1๏ธโฃ Leaflet → http://์์ดํผ1:ํฌํธ/proxy/wms
2๏ธโฃ Spring ProxyController ๋ด๋ถ์์ ๋ค์ ์์ดํผ1:ํฌํธ/proxy/wms ํธ์ถ
3๏ธโฃ ์๊ธฐ ์์ ์ ๋ค์ ํธ์ถํ๋ ๋ฌดํ ๋ฃจํ ๋ฐ์
์ ์์ ์ธ ์์ฒญ ํ๋ฆ
ํ๋ก์๋ “๋ธ๋ผ์ฐ์ → ํ๋ก์ → GeoServer” ํํ๋ก๋ง ๋์ํด์ผ ํ๋ค.
์ ์ ๋์ ๊ตฌ์กฐ๋ ์๋์ ๊ฐ๋ค:
Leaflet (๋ธ๋ผ์ฐ์ )
↓
Spring ProxyController (localhost:8080)
↓
GeoServer (localhost์ ๊ฐ์์์ดํผ1:ํฌํธ)
๊ทธ๋์ localhost๋ก ๋ฐ๊ฟ์ฃผ๋ฉด ๋ชจ๋ ํด๊ฒฐ๋๋ค.
GeoServer ํ๋ก์ ์ค์ ์, ํ๋ก์ ์๋ฒ ์์ ์ ๋ค์ ํธ์ถํ์ง ๋ง๊ณ GeoServer๋ง ํฅํ๊ฒ ํด์ผํ๋ค.