bootstrapcdn icon indicating copy to clipboard operation
bootstrapcdn copied to clipboard

Blocked by CORS Policy

Open UsgsMonkey opened this issue 2 years ago • 5 comments

Greetings,

Just in the last few days, we've run into issues running our Leaflet-based web portal @ https://hydromaintenance.nationalmap.gov/hmp which makes use of BootstrapCdn due to apparent CORS conflicts ...

image

We are using an older vintage of the library - but this is by necessity since it's a dependency of our Leaflet framework. Here are our existing stylesheet linkages:

<!-- Load Bootstrap 3.3.7: Latest compiled and minified CSS (requires JQuery) -->
<link rel="stylesheet"
      href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
      integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
      crossorigin="anonymous">

<!-- Load Bootstrap 3.3.7: Optional theme (requires JQuery) -->
<link rel="stylesheet"
      href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
      integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
      crossorigin="anonymous">

<!-- Load Bootstrap 3.3.6: necessary somehow for styles to properly render; may want to reconsider
resetting original Bootstrap version to 3.3.6 -->
<link rel="stylesheet"
      href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
      integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"
      crossorigin="anonymous">

Any assistance would be greatly appreciated!!! This is an important website that we need to keep live to serve our partners.

Regards,

Brett Dev Lead USGS NGTOC

UsgsMonkey avatar Mar 23 '22 19:03 UsgsMonkey

I have a feeling its not a CORS issue. Can you please try to open the file directly and see what you get? https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css

Do it on the same computer the screenshot came from. Additionally please ping "maxcdn.bootstrapcdn.com" and tell me the IP address you get

jimaek avatar Mar 23 '22 19:03 jimaek

It looks like I get a 504 error when I try to hit the CSS directly via Chrome. Pinging the address gets me the following...

image

When I try to reach the address outside the VPN firewall, I can reach it successfully - but that doesn't help our website :P

UsgsMonkey avatar Mar 23 '22 19:03 UsgsMonkey

I'm in contact with internal IT. Hopefully this can be resolved with their assistance.

UsgsMonkey avatar Mar 23 '22 19:03 UsgsMonkey

Can you actually traceroute it? And how does the 504 error look like? Because I think it's a LAN issue on your side, maybe a firewall?

jimaek avatar Mar 23 '22 20:03 jimaek

I think you're right. Good thought on tracert. I'm forwarding the issue to our IT. Sorry for the trouble and thanks for the assist.

UsgsMonkey avatar Mar 23 '22 20:03 UsgsMonkey