0

Currently I have a Glassfish 4 server which hosts an API on port 80 using SSL. Even though it is port 80 it is still using SSL. I did this because we were having issues with clients having their port 8181 blocked on their business networks and thus blocking calls from our Angular front end to the Glassfish back end API.

The Angular front end is being served by IIS over port 443 (ssl).

We made the assumption that most networks would have both port 443 and port 80 open, however we have now run into an issue where a clients network is blocking port 80 traffic.

The only solution I can think of is to move the Angular front end from IIS into Glassfish's docroot folder and have Glassfish serve both the back end API and the front end code.

Firstly, is there any better solution someone has to solve this issue with firewalls blocking ports to back end servers?

Secondly, the Angular code uses a router object which requires a URL rewrite rule to redirect all traffic to the base page. Example: If the angular code is hosted in the "angularApp" folder /angularApp/page/page would need to be redirected to /angularApp/index.html. Currently I dont know of any way to implement a URL rewrite rule in Glassfish specifically for webpages hosted in the docroot folder?

Curtis
  • 101
  • 1
  • Why not use IIS as a reverse proxy for the API? – vidarlo Nov 26 '21 at 22:56
  • @vidarlo because I didnt know i could do that lol. But ya that sounds like it might work... if I could figure out how to set that up. Thanks for the idea. – Curtis Nov 27 '21 at 23:03
  • @vidarlo thank you i was able to figure it out and set it up and now its working with IIS as a reverse proxy – Curtis Dec 14 '21 at 05:19

0 Answers0