0

Server / API: https://github.com/LambdaSchool/trinkets-api

Mock website: https://codesandbox.io/s/pt14-httpajax-ii-0176m?file=/src/components/Item.js

In the code it uses axios to request data from the server running locally on my machine. It works in Google Chrome but not Safari ... why and how do I solve this?

Safari Version 13.1 (15609.1.20.111.8)

DMConklin
  • 13
  • 5
  • Does the Safari network panel or the console panel show any errors? Does the same happen on Firefox or any other browser? – ronnyfm May 12 '20 at 02:50
  • 1
    [blocked] The page at https://codesandbox.io/s/pt14-httpajax-ii-0176m?file=/src/components/UpdateForm.js was not allowed to display insecure content from http://localhost:3333/items. Not allowed to request resource XMLHttpRequest cannot load http://localhost:3333/items due to access control checks. – DMConklin May 12 '20 at 14:01
  • It works fine in Google Chrome and Firefox – DMConklin May 13 '20 at 03:08
  • I'm assuming it's because it's over http and not https. Was hoping there was a work around or an allow mixed content setting but I haven't been able to find one in recent versions. – DMConklin May 13 '20 at 03:48

1 Answers1

0

Got it. Try enabling https for your local server. Safari does not allow mixed content. See Safari 9 disallowed running of insecure content?

ronnyfm
  • 1,973
  • 25
  • 31