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

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ม.ค. 2025

ความคิดเห็น • 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!

  • @slot642
    @slot642 ปีที่แล้ว

    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

  • @sathiyasp947
    @sathiyasp947 ปีที่แล้ว

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

  • @lahirukariyawasam7865
    @lahirukariyawasam7865 2 ปีที่แล้ว

    Great video. Very helpful.

  • @universecode1101
    @universecode1101 2 ปีที่แล้ว +1

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

  • @luisbarbosa5597
    @luisbarbosa5597 ปีที่แล้ว

    crack!! finally dudeee thanks for putting it this way

  • @tammielisa
    @tammielisa 8 หลายเดือนก่อน

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

    • @goffyfoot82
      @goffyfoot82 6 หลายเดือนก่อน

      figure it out

  • @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.

  • @josephuzuegbu7431
    @josephuzuegbu7431 2 ปีที่แล้ว

    this is one of the best explanation on CORS

  • @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

  • @tulehong3613
    @tulehong3613 2 ปีที่แล้ว +8

    Sorry, I still hate CORS.

  • @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

  • @ВоваМазур-ф4я
    @ВоваМазур-ф4я 2 ปีที่แล้ว

    thank you

  • @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...

  • @ranchpanda3530
    @ranchpanda3530 2 ปีที่แล้ว +2

    I have this as my unsolved problem -_-

  • @chesterxp508
    @chesterxp508 2 ปีที่แล้ว

    GoodJob!

  • @Randomguy48279xyz
    @Randomguy48279xyz 2 ปีที่แล้ว

    👍

  • @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 6 หลายเดือนก่อน +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 6 หลายเดือนก่อน

      @@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/