Skip to content

CORS error on HTTPS #2

@Ranko97

Description

@Ranko97

Hello, thank you for your tutorial on https://levelup.gitconnected.com/how-to-embed-a-web-server-inside-desktop-applications-643ce3cb51bf .

I had a small CORS problem which I solved on server by allowing any site to reach my app's endpoint (localhost:myPort) - AllowAnyOrigin() in ApiStartup. This solution works well on HTTP.

However, by enabling HTTPS (by creating my own self-signed certificate and configuring ServerService), I get CORS problem back. Api works on HTTPS via Postman normally, but browser always returns CORS error even though I imported my self-signed certificate in local truststore.

Do you have any idea what might cause such an issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions