Issue with AWS Cloudfront and Woocommerce cart - amazon-web-services

I have an issue with Woocommerce on my site when I enable AWS Cloudfront CDN to speed up the site.
The site is hosted on an AWS EC2 Bitnami instance. No parts of the site are hosted in S3.
When Cloudfront is enabled and I add a product to the cart then press the “Proceed To Checkout” button from the shopping-cart, nothing happens, the browser just loads the shopping-cart page again. If I disable Cloudfront in the AWS for WordPress plugin then it works as expected and opens the checkout page. This happens in all browsers.
Also, if I update the quantity to add extra options then the shopping-cart page reloads with a message of "Your basket is empty". The cart icon still has a "1" against it, and when I press it the shopping-cart page comes back witht the item in place, but I have the same issue when pressing the “Proceed To Checkout” button.
Looking at the developer tools in the browser there are no indicators of any errors. This seems to be some caching or cookie issue.
I have a a Cloudfront policy that has Origin, Access-Control-Request-Method and Access-Control-Request-Headers whitelisted in headers to resolve CORS issues with font files This works as expected and the fonts load correctly, before this was in place font icons would not display and I'd get lots of 404 errors.
Following some answers from this Cloudfront + Woocommerce - cart not updating SO post I tried whitelisting all cookies, and whitelisting jsut wp_woocommerce_session_* which I added while debugging this issue. Neither of these options made any difference.
The only way I can get it to work is by disabling Cloudfront. The site is slow to load without it though and SEO results are compromised.
Any idea what settings I need to change in order to get this to work?

In the end I ditched the official AWS plugin, and used another (free) AWS CDN specific plugin that did all the configuration and worked out of the box.

Related

Why does my facebook like button is not being displayed in some computers?

I have a website with published posts, like a blog, and each post page have a Facebook like button, provided by their official documentation page. When testing, on my local environment and on my test server it works fine, but in production the buttons don't show up. In some computers they popup, but in most cases it doesn't. The iframe is generated, but blank. I'll list what I already tried:
Disabled adblock
Cleaned cache
Tried on another browsers
Tried a different DNS server (the DNS that worked on one machine didn't work on another)
Looked for errors or any hint on chrome developer console, even inside the requests made to facebook
Checked the allow-origin configs on the apache server and tried different setups
Tried both method of embedding, through iframe and script

Why is my github pages not displaying for all users?

I made a portfolio website using a Jekyll template in Github Pages. 16 hours or so ago, I connected the Github pages site to a personal domain I purchased. I did so by creating a CNAME folder in the Pages repository and adding this CNAME as well as a few A variables to the DNS records with my domain provider (Domain.com) An hour or so after making these DNS changes, Github pages said my site was published on the new domain.
I shared the link to my new website with a few people. Several of them were able to access it without any issue; however, some reported that they received an empty white page when arriving to the site or a generic page with messaging along the lines of 'this domain hasn't been set up.' The failure to see the site seems to have no pattern across browser or device.
For me personally, I was able to see the site last night but this morning after deploying some new changes, I couldn't see the site for 30 minutes or so, until it suddenly worked again. During the time I couldn't see it, other friends reported that they were able to view it.
Any idea why this might be happening? I'm brand new to this stuff and I can't figure it out.
You could use dnsmap.io and check if the CNAME propagation is complete or still in progress.
You can see more at "Why are my CNAME Records not propagating?": that would explain the empty white page.
That being said, this could also be affected by an GitHub incident currently pending.

Sitecore requires me to login in order to see my website

When I access my site that's being managed by Sitecore, it's redirecting me and asking for Sitecore credentials. I have no idea why but obviously the main site should be viewable to public without needing creds.
Thanks.
This could be from your sitecore cookie still in page editor mode, To fix this add this query string to your URL:
?sc_mode=normal
This will update your cookie and no reddirect to login anymore
Assuming that you have a combined CM/CD environment and that this is specific to your computer or other authors' computers, it is likely that Sitecore is picking up on the fact that you were using the Page Editor in a previous session. When you are using Page Editor Sitecore will drop a cookie called website#sc_mode and set it to "edit". If you return to the page with that cookie set it will push you to the Login Page as it things you are attempting to edit that page.
To resolve this try clearing your cookies or using a browser in Incognito mode/Private Browsing.
If this is happening to other users I would suggest following Martijn's advice in the other Answer and checking your site definition.
Check your site definitions in the web.config and/or the sites.config in the /app_config/include/ folder. Most of the times there is some misconfiguration there.
Check the security roles set on your site pages. If for some reason access has been denied to the 'extranet/anonymous' user you won't be able to browse without being authenticated.

Github pages & jquery cookie; state saved on page level only

So I just put an old project on github. It was in PHP and had some cookie magic so that when
you "invert" the colors it would stay through the site. I saved a rendered HTML version of the the site for github and I also switched all the cookie magic to jquery.cookie so that it would work without a server-side component
There's a link to the site below.
http://reggi.github.io/csi-bp
So it seems that github pages set cookies on a page-level and they don't seem to transfer between pages. Is this the case? I'm curious as to what I'm missing.
I know they just switched the domain from github.com to github.io for cookie / security purposes, but I didn't know that it was going to result in this.
It could be a side effect of the newest security measure from GitHub (April 18th):
"Content Security Policy"
Content Security Policy is a new HTTP header that provides a solid safety net against XSS attacks.
It does this by blocking inline scripts and limiting the domains that other scripts can be loaded from.

web services access not being reached thru the browser

I am trying to reference my .asmx webservices in .NET but my server is not exposed to the internet. When I put on the following address I get the message mentioned below. What's the reason for not being able to see the directory? Am I missing something in my IIS configuraction? Am I missing anything in my permissions? Just as reference I have other folders with webservices and I have the same issue.
When I login to the server I am doing it with my windows user and password (I am using windows authentication). It's necessary to mention that when I put the URL I am getting a popup screen to put in my userid and password but it seems that's not able to validate since keeps asking me a couple of times. Let me know if you need more information to address this issue .
http://appsvr02/Inetpub/wwwroot/DevWebApi/
Internet Explorer cannot display the webpage
What you can try:
It appears you are connected to the Internet, but you might want to try to reconnect to the Internet.
Retype the address.
Go back to the previous page.
Most likely causes:
•You are not connected to the Internet.
•The website is encountering problems.
•There might be a typing error in the address.
More information
This problem can be caused by a variety of issues, including:
•Internet connectivity has been lost.
•The website is temporarily unavailable.
•The Domain Name Server (DNS) is not reachable.
•The Domain Name Server (DNS) does not have a listing for the website's domain.
•If this is an HTTPS (secure) address, click tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section.
For offline users
You can still view subscribed feeds and some recently viewed webpages.
To view subscribed feeds
1.Click the Favorites Center button , click Feeds, and then click the feed you want to view.
To view recently visited webpages (might not work on all pages)
1.Click Tools , and then click Work Offline.
2.Click the Favorites Center button , click History, and then click the page you want to view.
Try http://appsvr02/DevWebApi.
You shouldn't need to specify the full path, as IIS serves from wwwroot by default.
I don't know what I did but I was able to see it this time. thank youa all for your input. This is how the path to my server shows now. http://appsvr02/DevWeApi/Owner.asmx