Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Can't allow Iframe usage #214

Closed
ImBrendano opened this issue Jun 16, 2021 · 8 comments
Closed

Can't allow Iframe usage #214

ImBrendano opened this issue Jun 16, 2021 · 8 comments
Labels
question Further information is requested

Comments

@ImBrendano
Copy link

For some reason when changing allowIframes: false to true it's not only not allowing Iframes but also denying browser access as well. Thanks for your help Casper! :)

@casperiv0 casperiv0 added bug Something isn't working question Further information is requested and removed bug Something isn't working labels Jun 16, 2021
@casperiv0 casperiv0 pinned this issue Jun 16, 2021
@casperiv0
Copy link
Owner

Hey,

Due to new cookie regulations that don't allow Cross-Site cookies anymore, you need an SSL Certificate for your domain (https) to have this CAD/MDT work in iframes/cross-sites.

Once you've got your SSL certificate, you need to enable secureCookie in the config.ts:

allowIframes: true,
secureCookie: true,

@ImBrendano
Copy link
Author

Ahh, I was wondering if that was the case too I just didn't have the ssl cert. I appreciate it. Btw are you really 15?

@casperiv0
Copy link
Owner

Btw are you really 15?

For those interested: yes, I'm 15 at the time of posting this comment.

@casperiv0
Copy link
Owner

I'll keep this issue open for others too see. Maybe it helps them too

@ImBrendano
Copy link
Author

Damn man, I'm 21 and you're a far better coder than me.

@ImBrendano
Copy link
Author

Have the domain with ssl but I'm getting ERR_SSL_PROTOCOL_ERROR not sure what to do

@Motorloid01
Copy link
Contributor

If your using Linux Ubuntu (This is what I am currently running and it works)

Use Nginx to help out

@nap14hockey#1957 Posted this at the right time

sudo apt update
sudo apt install -y certbot

Run this if you use Nginx

sudo apt install -y python3-certbot-nginx

Nginx

certbot certonly --nginx -d example.com

Standalone - Use this if ngnix does not works. Make sure to stop your webserver first when using this method.

certbot certonly --standalone -d example.com

#sites-enable config

server {
listen 80;
listen 443 ssl;
server_name ;

ssl_certificate        <Directory to certs>/fullchain.pem;
ssl_certificate_key     <Directory to certs>/privkey.pem;
ssl_trusted_certificate <Directory to certs>/chain.pem;

location / {
proxy_pass http://localhost:3030;
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;
}
}

As well @Dev-CasperTheGhost This could also help in the Wiki for Ngnix

@casperiv0
Copy link
Owner

Will add it to the wiki soon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants