cancel
Showing results for 
Search instead for 
Did you mean: 
willetzky
Level 8

Web Gateway And Java script

Jump to solution

Hi

We are getting more and more sites that will not display correctly due to java script errors when going through the mcafee web gateway. I have tried white listing the sites and disabling other rules for the sites but can not get the error to go away. There is nothing being blocked in the troubleshooting logs. As soon as you bypass the gateway the site loads without issue.

javaerror.PNG

1 Solution

Accepted Solutions
McAfee Employee

Re: Web Gateway And Java script

Jump to solution

Hi Gareth,


As a test create a rule at the top of the ruleset that has the following:

-Name: Tunnel js.gz and css.gz

-Criteria: URL matches *.js.gz OR URL matches *.css.gz

-Action: Continue

-Event: Enable HTTP Tunnel

MWG will modify the content type (from application/javascript > application/gz) if it sees a gz extension. Changes are coming in a future version which will not require this rule..

Best,

Jon

9 Replies
asabban
Level 17

Re: Web Gateway And Java script

Jump to solution

Hello,

it looks like Javascript and also stylesheets and images are missing. What happens if you open one of the Javascript URLs in the browser manually?

https://cdn.clinicalkey.com/prod/rez-4.6/js/app.properties.js.gz

Does this show up or is there an MWG block page coming up?

Best,

Andre

0 Kudos
willetzky
Level 8

Re: Web Gateway And Java script

Jump to solution

Hi

If i enter the direct links to the java files it downloads the files without any issue or block message The website looks like it uses the result from the java to decide what style sheet to use.

thanks

Gareth

0 Kudos
McAfee Employee

Re: Web Gateway And Java script

Jump to solution

Hi Gareth,


As a test create a rule at the top of the ruleset that has the following:

-Name: Tunnel js.gz and css.gz

-Criteria: URL matches *.js.gz OR URL matches *.css.gz

-Action: Continue

-Event: Enable HTTP Tunnel

MWG will modify the content type (from application/javascript > application/gz) if it sees a gz extension. Changes are coming in a future version which will not require this rule..

Best,

Jon

willetzky
Level 8

Re: Web Gateway And Java script

Jump to solution

Thanks adding the rule fixed the issue

0 Kudos
giulio
Level 8

Re: Web Gateway And Java script

Jump to solution

Thank you very much Jon for this resolution, this rule helped me in resolving an issue.

Do you know in which version the rule is no more needed ?

thanks

Giuliano

0 Kudos
McAfee Employee

Re: Web Gateway And Java script

Jump to solution

Hi Giuliano,

Thank you for reviving this thread!

A fix was added in 7.5.0+, this can be globally changed in the proxies settings.

You will want this box *unchecked*, this means that the MWG will preserve the content-type sent by the server (text\javascript) instead of changing it based on what we found in the URL (application\gz).

    

Best Regards,

Jon

giulio
Level 8

Re: Web Gateway And Java script

Jump to solution

perfect! I will update you soon from 7.4.2.9 to 7.5.x

thank you very much again!

Regards

Giuliano

0 Kudos
belvincent
Level 9

Re: Web Gateway And Java script

Jump to solution

Hi Jon,

Thanks a lot for this rule, it also helped us to set a workaround for a business issue.

I have another question though, regarding this future setting in 7.5:

Will it also be possible to set it up somewhere in the policy settings so we will not have to go manually through all our gateways' configuration individually?

Thanks for your insight,

Vincent

0 Kudos
McAfee Employee

Re: Web Gateway And Java script

Jump to solution

Hi Vincent,

This is the new default setting anyways, so I would advise setting it on all of your MWGs and forgetting about it

This avoids having a one off rule that can be corrected globally in the proxy configuration.

Best Regards,
Jon

0 Kudos