Why I No longer Hate CORS and Why you should too!

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 29

  • @michaelhashimoto1650
    @michaelhashimoto1650 Рік тому +1

    Thank you! I get it now! I used to just get frustrated.. now I kind of know what to do and look for. Now I gotta figure out how to configure it for Spring Boot. Thanks!

  • @universecode1101
    @universecode1101 2 роки тому +1

    CORS is always something strange for a dev 😝 this content is very helpful 👏🏻

  • @tulehong3613
    @tulehong3613 2 роки тому +8

    Sorry, I still hate CORS.

  • @josephuzuegbu7431
    @josephuzuegbu7431 2 роки тому

    this is one of the best explanation on CORS

  • @timkilian7140
    @timkilian7140 2 роки тому +6

    CORS is complete bullshit. You can't do the request from the browser, but you can use a proxy that calls the request, and call the proxy in the browser. Completely useless.
    But I understand, that the application can not steel a different session, it could be implemented different tho, imo... Blocking the request completly is dump. Just remove the session.

  • @amirrahman853
    @amirrahman853 2 роки тому

    when i started learning there was no thing called cors and when it came i already knew why it is implemented :P

  • @luisbarbosa5597
    @luisbarbosa5597 Рік тому

    crack!! finally dudeee thanks for putting it this way

  • @slot642
    @slot642 11 місяців тому

    I am trying to fetch data from an api using react but the api isn't my own so i do not have access to add the cors middleware to it how do I go about that

  • @tammielisa
    @tammielisa 6 місяців тому

    Gee that’s nice. Now what do I do about “require is not defined?”

  • @juanausensi499
    @juanausensi499 2 роки тому +1

    I still haven't an answer: What is the point of cors? What is trying to achieve?

    • @joshuagermon2169
      @joshuagermon2169 2 роки тому +2

      To avoid malicious websites sending requests with your authentication cookies from your browser and having access to the response

  • @lahirukariyawasam7865
    @lahirukariyawasam7865 Рік тому

    Great video. Very helpful.

  • @sathiyasp947
    @sathiyasp947 Рік тому

    Awesome video. luckily I find it. It solved my problem.Thanks.

  • @Randomguy48279xyz
    @Randomguy48279xyz 2 роки тому

    👍

  • @ВоваМазур-ф4я
    @ВоваМазур-ф4я 2 роки тому

    thank you

  • @chesterxp508
    @chesterxp508 2 роки тому

    GoodJob!

  • @ranchpanda3530
    @ranchpanda3530 2 роки тому +2

    I have this as my unsolved problem -_-

  • @mrkhoros
    @mrkhoros 2 роки тому

    Why you should too! or you shouldn't?

    • @matiasmiraballes9240
      @matiasmiraballes9240 2 роки тому

      I was about to ask the same, he only told us how to fix the problems, no the benefits of using it.

    • @ticua07
      @ticua07 2 роки тому

      It's there to prevent malicious websites to able to send requests (that may have auth cookies or sensible data in the cookies) to other websites, pretty much setting a whitelist of domains/IPs that your API can be accessed to prevent being it used on other websites (with potentially bad purposes)

  • @VinnyXL420
    @VinnyXL420 2 роки тому

    Every single chime...

  • @jayvee-official
    @jayvee-official 2 роки тому +3

    you don't need to install CORS... while you can add a simple HTTP header: Access-Control-Allow-Origin :v

    • @DhavalAhir10
      @DhavalAhir10 5 місяців тому +1

      This is for Backend.
      You don't have Backend access.
      This header is send by Backend code in response not in with HTTP request.

    • @jayvee-official
      @jayvee-official 5 місяців тому

      @@DhavalAhir10 yep.. I use NodeJs/Express for backend and res.header() to setup vanilla CORS via related headers.. it’s worked without CORS

  • @vasiovasio
    @vasiovasio 2 роки тому +1

    For everyone who wants to improve the Security Headers on your site
    securityheaders.com/