My Vue+Laravel App doesn't want to do Vue on Heroku - laravel

I have a Laravel+Vue app that I successfully installed on Heroku and Laravel part works here (https://shoomilka-todoapp.herokuapp.com/), but my Vue code for this application doesn't want to work. Code you can see here https://github.com/shoomilka/todoapp.
Can you help me, please to fix the error of why Vue doesn't work on Heroku?
It works on local environment well.

Try inspect your website and look at the console tab. you will see this error.
Mixed Content: The page at 'https://shoomilka-todoapp.herokuapp.com/'
was loaded over HTTPS, but requested an insecure script
'http://shoomilka-todoapp.herokuapp.com/js/app.js?time=1590194712'.
This request has been blocked; the content must be served over HTTPS.
If your website delivers HTTPS pages, all active mixed content delivered via HTTP on this pages will be blocked by default.
The best strategy to avoid mixed content blocking is to serve all the content as HTTPS instead of HTTP. you can use laravel secure_assets method this generates a URL for an asset using HTTPS
<script src="{{ secure_assets('js/app.js') }}?time={{ time() }}"></script>
or simply just set 'url' => 'https://youDomain.com' in config/app.php and .env APP_URL=https://yourDomain.com

Related

Request blocking

I have an issue on my website.
When I accessed the website by IP everything is good but when I access the website by domain name I got this error:
Mixed Content: The page at `<URL>` was loaded over HTTPS, but
requested an insecure stylesheet `<URL>`. This request has been
blocked; the content must be served over HTTPS.
https://141.105.67.4/en/games
https://g11games.com/en/games
Can you please help to solve this issue.
As the error states, you website is being loaded via https, but the scripts contained within the website, are being loaded via http. Likely, in your config, you have set APP_URL to point the http URL, so all assets on your website are using that as the base URL. Changing that to HTTPS should resolve the errors.
fixed by adding
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

Prestashop and https

I have problem with https. In console I have
Mixed Content: The page at 'https://home.pl/pl/' was loaded over HTTPS, but requested an insecure image 'http://home.pl/img/cms/home.png'. This content should also be served over HTTPS.
The console "shows" the solution. You should serve the home.png with https, so the correct url should be https://home.pl/img/cms/home.png
In the .tpl use this snippet to check if is active the SSL mode in backoffice.
For example.
For the link:
My link
For images:
<image src="http{if Tools::usingSecureMode()}s{/if}://home.pl/img/cms/home.png">

How to stop Adsense loading mixed content on https site?

I am getting intermittent mixed content errors on my https site. The site link is stakeholdermap.com
I have checked Chrome Dev tools >Network tab and I am seeing unsecure urls examples below:
Mixed Content: The page at 'https://www.stakeholdermap.com/stakeholder-analysis.html' was loaded over HTTPS, but requested an insecure plugin data 'http://static.vertamedia.com/static/vpaid-ssp-vast.swf?aid=41476&sid=0&cb=146233.42079096.743365'. This content should also be served over HTTPS. ads?client=ca-pub-3370240294319443&format=300x250&output=html&h=250&slotname=8722343817&adk=5159607…
Mixed Content: The page at 'https://www.stakeholdermap.com/stakeholder-analysis.html' was loaded over HTTPS, but requested an insecure plugin data 'http://ads2.vertamedia.com/vast/vpaid-config/?width=300&height=250&aid=4147…takeholdermap.com&v=2.2.90&t=flash&video_duration=&cb=73026784276589750000'. This content should also be served over HTTPS.
But the adslots are using latest code (//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js)
I am pretty certain these are loaded by Adsense. My question is how can I block this or force it to use https?
Ask the users browser to fetch the secure content, if possible:
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
If the ad is available via https, then it will fetch that version, otherwise, the content will be blocked and another shown in its place. Put the meta in the <head> section of your pages where all your other meta tags are located.
You can find more information here: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/fixing-mixed-content

HTTPS assets loading over HTTP

I'm attempting to load Google Fonts and an image over HTTPS, but they keep loading over HTTP, despite changing the path to "https" in all of the assets.
Mixed Content: The page at 'https://' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300italic,300,400italic,500,500italic,700,700italic,900,900italic'. This request has been blocked; the content must be served over HTTPS.
Mixed Content: The page at 'https://' was loaded over HTTPS, but requested an insecure image
'http://farm6.staticflickr.com/5267/5783999789_9d06e5d7df_b.jpg'. This content should also be served over HTTPS.
You can use protocol related url like this:
'//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300italic,300,400italic,500,500italic,700,700italic,900,900italic'.
Also, do not forget to run
rake assets:precompile
before pushing to heroku.
For people who are facing similar troubles using laravel {{HTML::style('css/style.css')}} and {{HTML::script('js/script.js')}} can simply make the HTMLBuilder secure by modifying the statements to
{{HTML::style('css/style.css',array(),true)}} and
{{HTML::script('js/script.js',array(),true)}}
where 'true' insists that the content are severed secure or over HTTPS

Calling https version of TYPO3: content (css, js, ..) is blocked because link to http version

In Chrome I get the following error messages in the console
[blocked] The page at https://domain.com/home.html ran insecure
content from
http://domain.com/typo3temp/stylesheet_09c1ef800c.css?1345207892.
if I call https://domain.com. The user gets a page without stylesheets and images. What can I do against this?
The files are included like <script type="text/javascript" src="js/lib/jquery-1.5.1.min.js"></script> but I don't want to define the domain.
Should I completely switch to https by setting the base URL with https? Which other possibilites do I have?
I used
config {
baseURL = https://domain.com
}
and adapted all links which had a http in the beginning (otherwise the slider stopped working because Chrome didn't load the other ressources ...). Seems to work now.

Resources