2

I have a problem with opening site through the link in tomcat - I am got forbidden.

My steps are:
1. Launch http://hostname
2. Select https://hostname/Site
3. 403 forbidden message
When I am going directly through the browser like this https://hostame/site everything works fine.

even Select https://hostname/OtherSite
Works fine

Can anyone help? Thanks in advance.

Ravi Godara
  • 497
  • 6
  • 20

1 Answers1

0

here is my case.

you original page (with link) and the targeted linked page are not the same domain.

original-domain and target-domain.

if your target-domain not allow across-origin, then you get 403 forbidden error.

click link and enter url sending different request,

I found the difference is in request header:

click link (with 403 forbidden error),

         request header have one line:
                        Referer: http://original-domain/json2tree/ipfs/ipfsList.html

when I enter url, (no 403 forbidden), the request header does NOT have above line referer: original-domain

I finally figure out how to fix this error!!!

on your original-domain web page, you have to add

              <meta name="referrer" content="no-referrer" />

it will remove or prevent sending the Referer in header, works both for links and for Ajax requests made

hoogw
  • 4,982
  • 1
  • 37
  • 33
  • this is how you remove referer in quest header https://stackoverflow.com/questions/6817595/remove-http-referer – hoogw Jun 28 '19 at 20:31