cloudflare

NodeJS - only OPTIONS request is send to the REST API, POST or GET doesn't follow (Cloudflare)

最后都变了- 提交于 2019-12-11 07:43:19
问题 When my website calls the REST api (code below) then only the OPTIONS request goes through, the POST or GET request doesn't follow. The OPTIONS request successfully passes the CORS whitelist. The POST or GET request isn't logged, it's also not blocked by the whitelist. The weird thing is that the Google Recaptcha request works, all the third websites does, except for mine. The api is running on the same domain as the website, just another port. My website is using Cloudflare, Cloudflare

Deploying Phoenix Application to Heroku with SSL and CloudFlare “too many redirects”

此生再无相见时 提交于 2019-12-11 06:55:59
问题 Just recently deployed an Phoenix Application that runs just fine on the localhost. The domain name is something .ai and I would like to make anyone trying to use the www version to be redirected to the non-www version. All the DNS is being managed on CloudFlare's free plan. Worth noting that I'm using https and SSL, everything has been properly configured on Heroku. For some weird reason I keep getting a "too many redirects" error, although everything seems to be properly set. 回答1: I was

clearing cloudflare cache programmatically

邮差的信 提交于 2019-12-11 06:17:20
问题 I am trying to clear the cloudflare cache for single urls programmatically after put requests to a node.js api. I am using the https://github.com/cloudflare/node-cloudflare library, however I can't figure out how to log a callback from cloudflare. According to the test file in the same repo, the syntax should be something like this: //client declaration: t.context.cf = new CF({ key: 'deadbeef', email: 'cloudflare@example.com', h2: false }); //invoke clearCache: t.context.cf.deleteCache('1', {

How to locally run my cloudflare worker serverless function, during development?

有些话、适合烂在心里 提交于 2019-12-11 04:37:47
问题 I managed to deploy my first cloudflare worker using serverless framework according to https://serverless.com/framework/docs/providers/cloudflare/guide/ and it is working when I hit the cloud. During development, would like to be able to test on http://localhost:8080/* What is the simplest way to bring up a local http server and handle my requests using function specified in serverless.yml? I looked into https://github.com/serverless/examples/tree/master/google-node-simple-http-endpoint but

How to append SSL Origin Certificate with CloudFlare's Root Certificate?

别等时光非礼了梦想. 提交于 2019-12-11 04:24:27
问题 I was going through this tutorial where mentioned the process of "Installing CloudFlare Origin CA on cPanel". Everything was fine, except "Append CloudFlare's Root Certificate". I had received .pem key from Cloudflare Support where mentioned as well " you will need to append the appropriate root below to your .pem file. " I have CloudFlare Origin CA — RSA Root. I need help on Italic part. How to just append? . Please elaborate with description, it will help others too. 回答1: You literally just

New xfbml “Like” button + CloudFlare 503 error kills count?

元气小坏坏 提交于 2019-12-11 01:03:09
问题 Recently switched to XFBML to make our page more efficient. However, we noticed that when we started using fb:like vs. the old iframe new Facebook Likes are no longer recording! Wanted to get some insight on this. The Facebook debugger is not returning error codes so we're in the dark about what's causing this! Code reference, everything checks out though: <fb:like href="http://www.example.com/" send="false" layout="button_count" show_faces="false" width="90" font="arial" action="like"></fb

Assigning a CNAME to my static-website-bucket in amazon S3 using cloudflare

天涯浪子 提交于 2019-12-10 22:09:20
问题 I am working on creating a website for my brother (my first website) and have decided to host the whole site through amazon s3. I have done the usual setup so far: Create bucket with the name of the desired domain (www.website.com). Make the bucket a website and assign the index document and error page. upload all of the content and make it public. The website works fantastic through the bucket endpoint link http://www.website.com.s3-website-us-east-1.amazonaws.com/ Following other tutorials

Run script tags loaded with ajax

戏子无情 提交于 2019-12-10 14:56:05
问题 General Question Say you have a simple ajax request like $("#container").load('/url #content'); . The loaded DOM will be something like <a>email</a> <script>/* some script */</script> What can I do to get the contents of the script tags to execute? Specific Question Cloudflare automatically protects email addresses in the DOM by replacing the text with [email protected] and including a script that unravels it. However, the contents can be loaded asynchronously and the script that does the

Getting com.google.gwt.user.client.rpc.StatusCodeException: 0 in GWT

时间秒杀一切 提交于 2019-12-09 10:39:39
问题 I sometimes/often get this Exception in GWT but don't know why: SEVERE: com.google.gwt.user.client.rpc.StatusCodeException: 0 java.lang.RuntimeException: com.google.gwt.user.client.rpc.StatusCodeException: 0 at Unknown.java_lang_RuntimeException_RuntimeException__Ljava_lang_Throwable_2V(Unknown Source) at Unknown.de_ctech24_simplynews_web_client_util_SimpleCallback_$onFailure__Lde_ctech24_simplynews_web_client_util_SimpleCallback_2Ljava_lang_Throwable_2V(Unknown Source) at Unknown.com_google

Cloudflare service worker code to “Bypass cache on cookie” not working

混江龙づ霸主 提交于 2019-12-08 09:14:43
问题 I wrote this code as a Cloudflare Service Worker which is meant to precisely emulate their native function for "Bypass cache on cookie". Specifically, if someone has a Wordpress cookie - it would bypass cache, otherwise it does not. It does not seem to function at all - in that despite having a cookie and being logged in (confirmed via Chrome developer tools) - I still get a Cloudflare cache HIT on this example domain - Tallyfy. Anything wrong with it? Help appreciated! // A Service Worker