grandpaK420
grandpaK420
Explore posts from servers
TTCTheo's Typesafe Cult
Created by grandpaK420 on 10/28/2023 in #questions
Error in Next.js Caused by Middlware
I ran into the same problem this GitHub issue pointed out: https://github.com/vercel/next.js/issues/56368 And I can't get it to work based on the comments. Anyone can help please?
1 replies
TTCTheo's Typesafe Cult
Created by grandpaK420 on 7/19/2023 in #questions
ZOD
4 replies
CC#
Created by grandpaK420 on 4/30/2023 in #help
❔ SSL inside AWS EC2
Hello everyone, I am having issues with SSL. I bought a certificate from Sectigo (which I believe is a trusted CA), but when I connected the ssl certificate to nginx and to my nestjs app inside aws ec2, I am having a 'connection not secured'. How to solve this issue? Thanks Here is the nginx config:
server {
listen 443 ssl;
server_name app.blinkcard.io;

ssl_certificate /etc/nginx/ssl/blinkcard.io.crt;
ssl_certificate_key /etc/nginx/ssl/blinkcard.io.key;
ssl_trusted_certificate /etc/nginx/ssl/blinkcard.io.ca-bundle;

ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;

#add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With' always;

location ~* ^/.env {
deny all;
}

location / {
proxy_pass http://localhost:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 443 ssl;
server_name app.blinkcard.io;

ssl_certificate /etc/nginx/ssl/blinkcard.io.crt;
ssl_certificate_key /etc/nginx/ssl/blinkcard.io.key;
ssl_trusted_certificate /etc/nginx/ssl/blinkcard.io.ca-bundle;

ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;

#add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With' always;

location ~* ^/.env {
deny all;
}

location / {
proxy_pass http://localhost:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
40 replies
TTCTheo's Typesafe Cult
Created by grandpaK420 on 1/9/2023 in #questions
TimeZone issue
2 replies
TTCTheo's Typesafe Cult
Created by grandpaK420 on 12/2/2022 in #questions
Framer Motion useInView()
const introContainerRef = useRef<HTMLDivElement>(null);
const introContainerRef = useRef<HTMLDivElement>(null);
const introContainerInView = useInView(introContainerRef, {
margin: "100px 0px 0px 0px",
});
const introContainerInView = useInView(introContainerRef, {
margin: "100px 0px 0px 0px",
});
any idea why this is not adding 100px of margin until the introContainerInView will become true?
1 replies
TTCTheo's Typesafe Cult
Created by grandpaK420 on 11/27/2022 in #questions
Two Columns Grid Design
21 replies
TTCTheo's Typesafe Cult
Created by grandpaK420 on 11/24/2022 in #questions
Next JS Image Warning
I was getting this warning while using next/image
Image with src "<image_src>" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.
Image with src "<image_src>" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.
and when I add the priority prop to the <Image /> component I get this warning..
The resource http://localhost:3000/_next/image?url=%2F<image_src>&w=384&q=75 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
The resource http://localhost:3000/_next/image?url=%2F<image_src>&w=384&q=75 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
Any tip on how I can fix this warning? Thanks 🙂
5 replies