resource that redirect to domain name that only in local network #356

Closed
opened 2025-11-13 11:57:50 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @reedone816 on GitHub (May 21, 2025).

i have a webserver that automatically redirect to a another page.
we have local dns server that redirect that xxx.xxx.com domain.
for example in pangolin resource i set http://xxx.xxx.com:8000
now this website auto redirect that page to the login page http://xxx.xxx.com:8000/subdir/xx.jsp?bla=bla&bla
when it was redirected the pangolin break, and reveal the truepath of that login page, thus error site cannot be reached.
i also tried creating resource using ip address but still broken.

Originally created by @reedone816 on GitHub (May 21, 2025). i have a webserver that automatically redirect to a another page. we have local dns server that redirect that xxx.xxx.com domain. for example in pangolin resource i set http://xxx.xxx.com:8000 now this website auto redirect that page to the login page http://xxx.xxx.com:8000/subdir/xx.jsp?bla=bla&bla when it was redirected the pangolin break, and reveal the truepath of that login page, thus error site cannot be reached. i also tried creating resource using ip address but still broken.
GiteaMirror added the stale label 2025-11-13 11:57:50 -06:00
Author
Owner

@kalikid021 commented on GitHub (May 23, 2025):

It's a bit difficult to understand, but I believe you have a resource setup in pangolin with
http://example.com -> http://ipaddress:8000

you have a redirect configured in the webserver for
http://example.com:8000/ -> http://example.com:8000/subdir/xx.jsp?bla=bla&bla

If this is a correct understanding you need to modify your redirect to remove the port, to use the domain configured in pangolin
http://example.com/ -> http://example.com/subdir/xx.jsp?bla=bla&bla

the issue you seem to be having is the port number is in your redirect. Pangolin will proxy to that port, so if you want your traffic on the webserver side to be redirected to a specific URI when sent through the proxy, you need to remove the port from the redirect, since pangolin is handling the port translation.

If you need this to work both through and outside of pangolin you may need to setup your DNS with a split horizon, and/or have 2 separate redirects that handle both cases.

@kalikid021 commented on GitHub (May 23, 2025): It's a bit difficult to understand, but I believe you have a resource setup in pangolin with http://example.com -> http://ipaddress:8000 you have a redirect configured in the webserver for http://example.com:8000/ -> http://example.com:8000/subdir/xx.jsp?bla=bla&bla If this is a correct understanding you need to modify your redirect to remove the port, to use the domain configured in pangolin http://example.com/ -> http://example.com/subdir/xx.jsp?bla=bla&bla the issue you seem to be having is the port number is in your redirect. Pangolin will proxy to that port, so if you want your traffic on the webserver side to be redirected to a specific URI when sent through the proxy, you need to remove the port from the redirect, since pangolin is handling the port translation. If you need this to work both through and outside of pangolin you may need to setup your DNS with a split horizon, and/or have 2 separate redirects that handle both cases.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 7, 2025):

This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.

@github-actions[bot] commented on GitHub (Jun 7, 2025): This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 21, 2025):

This issue has been automatically closed due to inactivity. If you believe this is still relevant, please open a new issue with up-to-date information.

@github-actions[bot] commented on GitHub (Jun 21, 2025): This issue has been automatically closed due to inactivity. If you believe this is still relevant, please open a new issue with up-to-date information.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#356