Dhanuka777
Dhanuka777

Reputation: 8616

Asp.net MVC resolve Http/Https

"Mixed Content: The page at 'https://mywebsite/user/signin?ReturnUrl=%2f' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Raleway:300,200,100'. This request has been blocked; the content must be served over HTTPS."

In my head tag I have these links,

<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,400italic,700,800' rel='stylesheet' type='text/css'>

<link href='http://fonts.googleapis.com/css?family=Raleway:100' rel='stylesheet' type='text/css'>

Rather than making them https, is there a solution to determine http or https and dynamically change these links?, sounds like a very simple question.

Upvotes: 2

Views: 1368

Answers (1)

Dhanuka777
Dhanuka777

Reputation: 8616

Well, surprisingly the answer found to be a pretty simple one, just remove http

<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600,400italic,700,800' rel='stylesheet' type='text/css'>

<link href='//fonts.googleapis.com/css?family=Raleway:100' rel='stylesheet' type='text/css'>

Upvotes: 3

Related Questions