cloudflare

Creating a subdomain with Google Cloud + CloudFlare

 ̄綄美尐妖づ 提交于 2020-01-16 01:34:32
问题 I have a domain bar.com on CloudFlare that is linked to a site hosted on Google Cloud. I can create a new A record on CloudFlare for a subdomain "foo", but how do I map that to bar.com/foo on Google Cloud? I'm not sure if this question makes sense. Basically, I have a site that is hosted on standard server which I am moving to Google Cloud. On the standard server, I have CPanel which handles creation of subdomains (of which are added to CloudFlare's DNS). I'm not sure how this process is

Python Scraper Unable to scrape img src

こ雲淡風輕ζ 提交于 2020-01-13 06:52:14
问题 I'm unable to scrape images from the website www.kissmanga.com . I'm using Python3 and the Requests and Beautifulsoup libraries. The scraped image tags give blank "src". SRC: from bs4 import BeautifulSoup import requests scraper = cfscrape.create_scraper() url = "http://kissmanga.com/Manga/Bleach/Bleach-634--Friend-004?id=235206" response = requests.get(url) soup2 = BeautifulSoup(response.text, 'html.parser') divImage = soup2.find('div',{"id": "divImage"}) for img in divImage.findAll('img'):

cloudflare 屏蔽某区域ip

只谈情不闲聊 提交于 2020-01-08 05:35:14
如果使用cloudflare加速的网站,默认会开启IP Geolocation这个选项(在network里可以找到), 它发送一个访问者的国家代码参数 $HTTP_CF_IPCOUNTRY 到nginx,这样我们就可以直接根据这个参数来屏蔽ip了。 在nginx配置加入,如果有rewrite,尽量放在rewrite规则前 location / { if ($http_cf_ipcountry = CN) { return 404; } } 国家代码参见:https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 此外还可以加上白名单功能 location / { if ($ip_whitelist = 1) { break; } if ($http_cf_ipcountry = CN) { return 404; } } 来源: https://www.cnblogs.com/yerkle/p/9669277.html

Cloudflare Conflicting Page-Rules?

試著忘記壹切 提交于 2020-01-07 03:58:10
问题 I have a website, say example.com. Couldflare is set to cache everything on *example.com/* If I add another rule: *nope.example.com/* And set it to bypass cache, what will cloudflare do with the conflicting page rules? 回答1: According to Source A; Page Rules are applied in the order that they are listed. So, all you would have to do is put the bypass cache first and then the cache everything rule: *nope.example.com/* (Bypass) *example.com/* (Cache Everything) 来源: https://stackoverflow.com

How with use node.js get information from this tag that in page source - {{= flyingStatus(it.m_status) }}?

对着背影说爱祢 提交于 2020-01-06 08:26:15
问题 If I look page source, I see "unusual" attribute value: class = "bma-fly flying {{= flyingStatus(it.m_status) }} Usually for me this is: class = "value" After loaded page, if I use button "Inspect", I see: class = "bma-fly flying flying-won-team2 flying-past" Now question, how get information with use Node.js from this "unusual" attribute value, if I use cheerio (jquery), but see nothing??? For example: request(link, function(err, resp, html) { if (!err){ const $ = cheerio.load(html); let

Get visitors ipv4 behind cloudflare

倾然丶 夕夏残阳落幕 提交于 2020-01-06 02:27:11
问题 I just have the problem that I want to get the visitors IP Address. Everythings fine but one user just give me the IPv6. This is the code I can give you, moreover I just had installed the cloudflare apache2 Mod. $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"] ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"]; $ip = $_SERVER['REMOTE_ADDR']; if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])){ $ip = $_SERVER['HTTP_CF_CONNECTING_IP']; } 回答1: The only way to do this would be to

How to bypass CloudFlare rocket script if wp_enqueue_script is used to add scripts?

烂漫一生 提交于 2020-01-05 08:50:29
问题 I just googled this but didn`t retrieve any specific info. I have such code on a PHP template for WordPress: <?php wp_enqueue_script( 'jquery-carousel', get_template_directory_uri().'/js/jquery.carouFredSel-6.2.1-packed.js', array('jquery'),'',true); ?> And I want to add CloudFlare ignore for Rocketloader data-cfasync="false" just before the 'src' attribute of jquery.carouFredSel-6.2.1-packed.js What can I do? Regards Edit: A big thanks to @Mary for the code. So the solution for this is to

Mixed Content with Pelican

℡╲_俬逩灬. 提交于 2020-01-04 06:03:47
问题 TL;DR My Pelican blog is served through HTTPS but CSSs are not loaded because of "mixed content", even though they appear in the page source as HTTPS. Context I have a Pelican blog hosted on GitHub pages. I have a CNAME record for a custom domain to point to this blog. The aim I'm trying to achieve serving this blog with HTTPS, which is possible with CloudFlare (GitHub support told me it's the only solution at the moment). The problem After setting everything as indicated, I can access my

Mixed Content with Pelican

…衆ロ難τιáo~ 提交于 2020-01-04 06:03:11
问题 TL;DR My Pelican blog is served through HTTPS but CSSs are not loaded because of "mixed content", even though they appear in the page source as HTTPS. Context I have a Pelican blog hosted on GitHub pages. I have a CNAME record for a custom domain to point to this blog. The aim I'm trying to achieve serving this blog with HTTPS, which is possible with CloudFlare (GitHub support told me it's the only solution at the moment). The problem After setting everything as indicated, I can access my

Wildcard SSL Certificates, Custom Domain Names, and Cloudflare

风流意气都作罢 提交于 2020-01-02 06:23:28
问题 I have a domain with a wildcard SSL certificate (https://domainA.com). I have users who use custom subdomains (https://user1.domainA.com). I have users who wish to use custom domains that point to their subdomains (CNAME records from https://domainB.com to https://user1.domainA.com). The problem with these custom domains is that they throw an SSL warning in the browser, as the domain name on the SSL certificate (https://*.domainA.com) does not match the domain name being used to access the