cloudflare

how to disable direct access to a web site by ip address

时光总嘲笑我的痴心妄想 提交于 2019-12-03 04:14:11
问题 I have a website on a VPS. The issue I am having is that when I enter the IP of the server, it links to the website. Even when entering mail.domain.com, it does the same thing. How do I disable that, so a visitor would get a message or be directed to the domain? I tried disabling the IP and mail a record on cloud flare but it didn't work. My setup is: VPS on Linux Debian Nginx no control panel just command line Cloudflare DNS setup with BIND 回答1: You can use redirect, nginx config: server {

How to bypass cloudflare bot/ddos protection in Scrapy?

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I used to scrape e-commerce webpage occasionally to get product prices information. I have not used the scraper built using Scrapy in a while and yesterday was trying to use it - I run into a problem with bot protection. It is using CloudFlare’s DDOS protection which is basically using JavaScript evaluation to filter out the browsers (and therefore scrapers) with JS disabled. Once the function is evaluated, the response with calculated number is generated. In return, service sends back two authentication cookies which attached to each

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

匿名 (未验证) 提交于 2019-12-03 01:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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 there is no "start" script. There seem to be no

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

匿名 (未验证) 提交于 2019-12-03 01:37:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: 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 which skips cache if the request contains

通过Cloudflare开启全站https

匿名 (未验证) 提交于 2019-12-03 00:14:01
Cloudflare HTTPS ,服务端不用做任何修改,还可以选择多种开启模式 直接打开网站: https://www.cloudflare.com ,就可以注册账号了,然后添加域名,选择 Free 套餐,没有任何费用 免费套餐只能通过 DNS Partner ,可以通过 CNAME 配置 查看 Cloudflare 给自己分配的 DNS 以 aliyun 为例,打开自己的域名商网站修改 DNS 控制台=>域名=>管理=>修改DNS 修改为 Cloudflare 分配的 DNS 后,等待生效…………………… 检查生效状态 配置域名解析,一般会将解析同步过来,打开小云朵表示开启CDN加速 有四种模式可以选择,分别是 Off (not secure) 不开启 Flexible 开启 浏览器到<->Cloudflare Full 开启 浏览器<->Cloudflare<->服务器 Full (strict) 开启 浏览器<->Cloudflare<->服务器 信任证书,更加严格 至此,已经通过 Cloudflare 开启了 DNS、CDN、HTTPS 但: 免费套餐在国内是没有快速的 CDN 节点,CDN 也就没有加速的效果了 如果需要国内快速的 CDN ,可以使用企业版,但要不差钱,或使用国内合作商 百度云加速 邮箱: iChochy@qq.com 网站: https://www

Is it possible to increase CloudFlare time-out?

匆匆过客 提交于 2019-12-03 00:00:46
Is it possible to increase CloudFlare's time-out? If yes, how? My code takes a while to execute and I wasn't planning on Ajaxifying it the coming days. No, CloudFlare only offers that kind of customisation on Enterprise plans . CloudFlare will time out if it fails to establish a HTTP handshake after 15 seconds. CloudFlare will also wait 100 seconds for a HTTP response from your server before you will see a 524 timeout error . Other than this there can be timeouts on your origin web server. It sounds like you need Inter-Process Communication . HTTP should not be used a mechanism for performing

Can one cache and secure a REST API with Cloudflare?

血红的双手。 提交于 2019-12-02 18:51:44
I am designing a RESTful API that is intended to be consumed by a single-page application and a native mobile app. Some calls of this API return public results that can be cached for a certain time. Moreover, there is a need for rate protection to protect the API against unauthorized users (spiders) Can I use Cloudflare to implement caching and rate-limiting / DDOS protection for my RESTful API? Caching: Cloudflare supports HTTP cache control headers so the API can decide for each entity requested via GET whether is public and how long it can be cached. However it is not clear whether the

how to disable direct access to a web site by ip address

狂风中的少年 提交于 2019-12-02 17:07:08
I have a website on a VPS. The issue I am having is that when I enter the IP of the server, it links to the website. Even when entering mail.domain.com, it does the same thing. How do I disable that, so a visitor would get a message or be directed to the domain? I tried disabling the IP and mail a record on cloud flare but it didn't work. My setup is: VPS on Linux Debian Nginx no control panel just command line Cloudflare DNS setup with BIND Chernov You can use redirect, nginx config: server { listen 80; server_name IP_ADDRESS; return 301 http://YOUR.DOMAIN; } AMB server { listen 80 default

MediaWiki sessions and cookies not working on multi-server behind CloudFlare

一个人想着一个人 提交于 2019-12-02 12:00:24
问题 I have a MediaWiki running on multiple AWS instances and login and registration is broken. The session.save_path is set to /tmp which is writeable and readable by anyone. I use Apache2 and PHP5 as well as MEMCACHED. Whenever you try to login you either get informed that there is protection against session hijacking or that you have cookies off. These are the errors: There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go

公共DNS性能大比拼

为君一笑 提交于 2019-12-01 19:43:43
​ 今天中午,访问Gitee突然访问不进去,然后收到红薯通知:阿里云停止了 Gitee.com 的域名解析。 ​ ​ 码云官方也随后给出解决办法 没有任何提示,没有任何提前通知,阿里云停止了 Gitee.com 的域名解析!!! 我们正在跟阿里云联系了解具体情况! 如果你访问不了请暂时在 hosts 里映射 gitee.com 域名到 IP地址 212.64.62.174 对此造成你的不便,我们深表歉意。 ​ 那么先解释一下什么是DNS,百度百科说:域名系统(Domain Name System,缩写:DNS)是互联网的一项服务。它作为将域名和IP地址相互映射的一个分布式数据库,能够使人更方便地访问互联网。通俗一点来说就是:我们不可能记住那么多的IP地址,但是我们可以记住域名啊,比如baidu.com,我们在地址栏输入baidu.com之后,会经过一个域名解析服务器把我们输入的域名转换为Ip。所以DNS最通俗来说就是一个域名解析服务器。 ​ 那么为什么阿里云hold处理之后很多用户受影响,而一少部分用户没有受影响呢?或者说为什么修改本地Hosts就可以继续正常访问呢? ​ 其实所有的域名解析,会先经过一次本地HOSTS文件检索,如果本地有对应配置解析,会先走自己本地所配置的解析,如果本地没有配置,那么会继续往上解析,由于国内网络运营商为了大家网络响应速度(减少域名解析时间