helios-ag / FMElfinderBundle

:file_folder: ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
MIT License
275 stars 128 forks source link

How to force httpS loading? #414

Closed digitimage closed 2 years ago

digitimage commented 4 years ago

Hi I'm using El Finder as file browser for tinymce (with stfalcon/TinymceBundle) in Symfony 5. It works great in local dev environment (even in HTTPS) but I get this error in prod environment: The page at 'https://mydomain/admin/edit' was loaded over HTTPS, but tinymce.min.js requested an insecure frame 'http://mydomain/elfinder'. This request has been blocked; the content must be served over HTTPS. Is there a way in config to force tinymce to call El Finder over HTTPS ? Thanks Cyril

ghost commented 3 years ago

Hi Can you post your configuration and the code of the page where you use elfinder ;)

Thanks

helios-ag commented 3 years ago

@digitimage Probably this should resolve your issue (didn't checked) https://symfony.com/doc/current/routing.html#forcing-https-on-generated-urls

url comes from https://github.com/helios-ag/FMElfinderBundle/blob/master/src/Resources/views/Elfinder/helper/_tinymce4.html.twig#L4

digitimage commented 3 years ago

Hi I did try to force https on generated url (as explained by the symphony documentation) but for some reason, it didn't work in my prod environment :-( So I made my own twig template based on _tinymce4.html.twig but using path() instead of url() to get the relative path. Maybe it could be useful for someone else Cyril

helios-ag commented 2 years ago

Closing as resolved