NGINX + Cloudflare SSL Certificate is not valid

I’ve tried to set a simple server for testing purpose. I am totally new in website deployment so i don’t know how to resolve this. this is nginx conf: server { listen 80; listen [::]:80; server_name shhossain.info http://www.shhossain.info; return 302 https://$server_name$request_uri; } server { listen 443 ssl http2; listen [::]:443 ssl http2; ssl_certificate /etc/ssl/certs/cert.pem; ssl_certificate_key… Read More NGINX + Cloudflare SSL Certificate is not valid

Multiple zone ids from cloudflare_zones in terraform

So i have a terraform variable type list(string) that is called zones and contains zones = [ "example.com", "example2.com", "example3.com", … ] and i m using data cloudflare_zones resource to fetch all zones info data "cloudflare_zones" "zones" { for_each = toset(var.zones) filter { name = each.value } } Output for each of the zones data.cloudflare_zones.zones["example.com"]… Read More Multiple zone ids from cloudflare_zones in terraform

how to execute cleanup function in useEffect() only when component unmounts

I want to clear filters only when the component unmounts. So I wrote cleanup function only in useEffect(). But as I checked it with console.log(), 1 was printed after the component mounted too. What’s wrong in this way? useEffect(() => { return () => { clearFilters(); console.log(1); }; }, []); Stack Snippet: const { useState,… Read More how to execute cleanup function in useEffect() only when component unmounts