우리 앱은 web app 방식, 웹뷰를 이용해 껍데기만 앱을 씌워 놓았다.
실제로 앱껍데기에서 웹뷰를 이용한 브라우저 호출을 한다는 것을 의미한다.
우리는 안타깝게도…
Stage 환경에 대한 부분이 TEST app 을 위하여서도 잘 구성이 되어 있지 않았기 때문에
개발한 내용을 App 에서 직접 테스트 할 수 없었다.
따라서 개발한 내용이 App 에서도 테스트 할 수 있도록 Proxy 서버를 만든 후 앱을 테스트 할 수 있도록 한다.
내용은 몹시 간단하다.
Proxy 서버를 경유하게 한 뒤 프록시 서버의 /etc/hosts 파일에
api 서버 혹은 웹서버를 지정해 준다.
apt-get -y update
apt-get -y upgrade
apt-get -y install squid
vi /etc/squid/squid.conf
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
include /etc/squid/conf.d/*
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localne
acl office src 211.BBB.CCC.DDD/255.255.255.0
http_access allow office
# And finally deny all other access to this proxy
http_access deny all
acl office src 211.BBB.CCC.DDD/255.255.255.0
http_access allow office
사무실 아이피를 등록하고 allow 처리를 반드시 해 줘야 합니다.