Notifications
Clear all

CloudFront and wpDiscuz

4 Posts
3 Users
0 Reactions
1,122 Views
(@sasha)
Member Customer
Joined: 6 years ago
Posts: 2
Topic starter  

We use wpdiscuz comment system and we want to use AWS cloudfornt on our site. But when turn CloufFront on  we are getting a lot of errors as
"Access to XMLHttpRequest at 'js' from origin 'host' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
As a solution we tried to dis-register wpdiscuz.js (and other plugin js files) and put it directory to footer, or display via php object buffer. Also we tried different config with native.ajax/wp-discuz ajax. So how can we use wpdiscuz

WPDiscuzComment

with cloudfront without conflicts?

Thanh you!


   
Quote
Topic Tags
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

Hi @sasha,

Please navigate to Dashboard > Comments > Settings > General admin page, enable the "Use WordPress native AJAX functions" option, delete all caches and check again. 

Don't forget to press CTRL+F5 on the frontend before checking. 

If it doesn't help please try to exclude the wpDiscuz plugin from the AWS CloudFront.  


   
ReplyQuote
(@sasha)
Member Customer
Joined: 6 years ago
Posts: 2
Topic starter  

Can you please suggest how to  exclude the wpDiscuz plugin from the AWS CloudFront?

Thank you!


   
ReplyQuote
Elvina
(@elvina)
Support
Joined: 5 years ago
Posts: 1403
 

@sasha,

You should exclude:

/wp-content/plugins/wpdiscuz/assets/wpdiscuz.js

I'm sorry, but I'm not familiar with this plugin. To know on how to exclude js files from AWS CloudFront,you can make search on google.


   
ReplyQuote
Share:
Scroll to top