Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scorm Proxy #49

Open
mauricioss777 opened this issue Dec 12, 2023 · 3 comments
Open

Scorm Proxy #49

mauricioss777 opened this issue Dec 12, 2023 · 3 comments

Comments

@mauricioss777
Copy link

Hello everyone!

I've created a player for SCORM and embedded it into my system. My system is developed in PHP with Laravel and is hosted at myhost.com/player.php. The issue I'm facing is that I've hosted the unpacked SCORM package files in an S3 bucket on Amazon and created a link through CloudFront. When I try to access the SCORM content in the player by pointing to the CloudFront link, several security errors occur. Is there any way to fix this? I've been thinking about implementing a proxy for SCORM and dynamically loading the files. Is there already a solution for this?

Thank you very much!

@arashster
Copy link

What security errors are you getting? CORS specifically?

@mauricioss777
Copy link
Author

mauricioss777 commented Dec 12, 2023

Yes, CORS. But I guess it is not the unique problem.
I've tried to solve this in so many ways that I no longer know exactly what I'm doing. I left logic aside and was already trying and error.
The infrastructure team has tried different ways to configure AWS, but nothing seems to work.
From what I've been researching, RusticSoftware created a solution for this by placing a proxy between the player and the file server where the scorm courses are located.
Have you ever been through something similar?

What I'm trying to do is the following:
I have an LSM on an ec2 with a domain mylms.com
This LSM has a scorm player that responds like this: mylms.com/player.php?scorm=
This player points the iframe to a CloudFront link aws.cloudfront.com/link/to/scorm/content/

The CloudFront link links to an s3 bucket where the scorm course files are available.

When I point to the files locally (within the mylms.com server) everything works. When I point to CloudFront, the browser generates several CORS and Cross-domain errors.

@arashster
Copy link

arashster commented Dec 16, 2023

Which web server are you using? Nginx or Apache?
You could configure Nginx or Apache2 to proxy the S3 bucket or CloudFront endpoint.

https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/
https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html

This way the content can play on the same domain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants