10
inaba
6y

"Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://19-" SHUUUUUUUT UUUUUUUUUUUUP FOR FUCKS SAKE

I fucking have app.UseCors(x => x).AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); in my startup. It's not supposed to tell me the CORS request did not succeed becuase THERE'S NOT SUPPOSED TO BE CORS WHEN I DO THAT.

Comments
  • 2
    FUCK OOOOOOOOOOFFFFFF

    https://imgur.com/a/lOztnOq
  • 2
    @irene Because I'm tired and annoyed and added a ) the wrong place when I wrote that shit because reading inlined code is shit and I thought something was up asdfgrashdthfgasdfasdf
  • 10
    Welp, that's embarrasing. So what happened was I requested for https but the server doesn't use https. Whooops :v
  • 4
    Here's a fun fact: in dotnet core, sometimes when a 500 internal server error happens, it'll tell you that's it a cors error. Not all the time, just some of the time. With no recognisible pattern.

    I hate Microsoft 🙂
  • 1
    @KasperNS What I really don't like is all the default stuff they put in, although this is generally mostly true for ASP.NET Core MVC.
  • 2
    @inaba that's true, but I can live with that. I can't tell how many hours I've spent debugging cors, until I found out it had absolutely nothing to do with cors
  • 1
    @KasperNS The identity stuff that's build in is pretty nice. But god damn it's also plagued with the whole "don't worry about the defaults" shit where you and up wondering where stuff is actually stored and how it works and stuff
  • 2
    Not to be a philosopher here, but save yourself headaches and keep a template of Startup.cs aside, whenever I start a new dotnet core service I just throw my old startup file and I'm done.
    Also have a template for registering policies and roles
  • 1
    SHUT THE FUCK UP THE HTTPS THING IS WHATS BEEN WRONG WITH MY FUCKING APP I JUST REALIZED
  • 2
    @gitpush please share one, I hate CORS error too
  • 2
    Situations like this make me hate dotnet/aspnet core with all my guts.
  • 1
    @inaba To be fair, the IdentityProviders that are prebuilt are what you call magic. You can always implement your own one (like I did) that does exactly what you want.
  • 1
    @devTea will do, I'll send you both files tonight need to remove personal stuff from their first lol
  • 1
  • 2
    @gitpush thank you sir
Add Comment