question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to fetch http://somefunctionname.azurewebsites.net/swagger.json - The page was loaded over https:// but a http:// URL was specified

See original GitHub issue

Microsoft.Azure.WebJobs.Extensions.OpenApi v0.8.1-preview

The extension works locally when I make a request to https://somefunctionname.azurewebsites.net/swagger/ui. When I deploy the Azure Function to Azure https://somefunctionname.azurewebsites.net/swagger.json also works. But when I try https://somefunctionname.azurewebsites.net/swagger/ui I get

Fetch errorFailed to fetch http://somefunctionname.azurewebsites.net/swagger.json
Fetch errorPossible mixed-content issue? The page was loaded over https:// but a http:// URL was specified. Check that you are not attempting to load mixed content.

image

When I then update the Explore URI to https it works

image

Is this a bug or do I miss a setting to work with HTTPS on the first request?

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
mikemassa84commented, Sep 1, 2021

@dr-dolittle I reported this same issue, and found this work around:

https://github.com/Azure/Azure-Functions/issues/1933#issuecomment-889178952

Hope it helps.

@justinyoo The azure functions team punted this issue back to you.

2reactions
mlowijscommented, Aug 30, 2021

@justinyoo What do you mean it is something you can’t handle? Is it not possible to offer this as a configuration option or something like that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net - Swagger UI - TypeError: Failed to fetch
After searching around, I found that a possible cause of this error is because of a CORS issue, where the origin is changed...
Read more >
Swagger Mixed Content Issue - http vs https #1933
The Swagger UI is not able to render when the Azure function is hosted on a dedicated Linux app service plan. Attempting to...
Read more >
Read JSON File into HTML with JavaScript Fetch API - YouTube
How to read JSON files into HTML with JavaScript fetch (). ... fetch () 2:10 - CORS error (solution: Live Server) 3:35 -...
Read more >
JavaScript Tip: Loading a Local JSON File without Fetch
Loading a local JSON file is frequently done with fetch. But that is not the only way to accomplish this. In this tutorial...
Read more >
JavaScript Tip: Using fetch to Load a JSON File - YouTube
In this tutorial we continue our discovery of the fetch API by looking at how it can be used to load a JSON...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found