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

Got an issue with Content Security Policy (CSP) #8

Closed
keeratita opened this issue Feb 26, 2025 · 8 comments · Fixed by #9
Closed

Got an issue with Content Security Policy (CSP) #8

keeratita opened this issue Feb 26, 2025 · 8 comments · Fixed by #9
Assignees
Labels
enhancement New feature or request

Comments

@keeratita
Copy link

Hi,

I've got an issue about CSP when the security team doesn't allow to use unsafe-eval.

Uncaught (in promise) EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive

Is it possible that the future release will kindly consider this one as well?
Thanks in advance 🙏🏻

@hoppergee
Copy link
Owner

I'll see what I can do about this.

@hoppergee hoppergee self-assigned this Feb 26, 2025
@hoppergee hoppergee added the enhancement New feature or request label Feb 26, 2025
@hoppergee hoppergee linked a pull request Feb 26, 2025 that will close this issue
@hoppergee
Copy link
Owner

Hi @keeratita

I just bump a new release 1.1.6. Please have a test with below code to see whether it's being fixed.

- import { heicTo } from "heic-to"
+ import { heicTo } from "csp/heic-to"

@keeratita
Copy link
Author

keeratita commented Feb 26, 2025

hi @hoppergee Thanks a lot for your prompt response.
OMG that's fast! I will test it now 🙏🏻

@keeratita
Copy link
Author

hi @hoppergee works! thanks a lot for your help 🙇🏻

@keeratita
Copy link
Author

keeratita commented Feb 26, 2025

FYI, i have to import like this.

import { heicTo, isHeic } from 'heic-to/dist/csp/heic-to';

i can't use from 'csp/heic-to'; for some reason.

@keeratita
Copy link
Author

hi @hoppergee

Sorry, one more question about the usage of this library. Could I use it as a part of a functionalities in the commercial application to preview a HEIC file on the browser?

@hoppergee
Copy link
Owner

hoppergee commented Feb 26, 2025

libheif is on LGPL, the answer is yes I think.

@keeratita
Copy link
Author

@hoppergee the best! thanks

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

Successfully merging a pull request may close this issue.

2 participants