Building Microservices with Go: 9 CORS (Cross-Origin Resource Sharing)

  Рет қаралды 19,388

Nic Jackson

Nic Jackson

Күн бұрын

Пікірлер: 18
@christianh3619
@christianh3619 4 жыл бұрын
I finally understand CORS. Thank you for this great series!
@jub0bs
@jub0bs Жыл бұрын
Although I appreciate the series, this specific video contains some misleading statements: - At 2:54, "CORS is blocking [...]". Don't conflate the Same-Origin Policy (SOP) and CORS. The latter is only meant to relax the former's restrictions. As such, CORS isn't blocking anything; the SOP is. - From 4:28 onwards, Nic explains that CORS acts a defence against CSRF attacks. That is not the case. In fact, activating CORS may open the door to more cross-origin attacks than would otherwise be possible. - At 5:55, Nic implies that a preflight request is unconditionally issued whenever the client attempts to send a cross-origin request. That's incorrect; some requests, colloquially known as 'simple', do not give rise to preflight requests.
@johndoe-lx3zh
@johndoe-lx3zh 3 жыл бұрын
You are a treasure! Thank you for your work!
@thesamurais8036
@thesamurais8036 5 ай бұрын
ultimate thanks man now my bug fixed
@adammontgomery7980
@adammontgomery7980 4 жыл бұрын
Struggled with CORS in a node app I worked on. Got a lightbulb when you said allowed origins must be set on the backend.
@leejohnmitchell
@leejohnmitchell 4 жыл бұрын
Good explanation and nice example of gorilla. I had this exact problem some months ago and wish I'd discovered this video back then, would have saved me some lost hair!
@martynjxrez6408
@martynjxrez6408 3 жыл бұрын
thank you very much, amazing tutorial
@bothorsen4292
@bothorsen4292 4 жыл бұрын
Hi Nic, thank you for this. Even though I've been using go for a while now, there have been some nice hints in this series. The question I have is if CORS is still a problem if you serve the React site from within go? For example, the site is returned from /index.html and your service is on /api/products.
@MrChickenpoulet
@MrChickenpoulet 4 жыл бұрын
I guess it is not as it requests resource from the same URL, but well, as cors is sometimes a mystery to me, I would not be suprised if there were issues :D !
@0x6e95
@0x6e95 4 жыл бұрын
There should be no issues as long as the API and the client is hosted on the same domain. CORS only applies if the client and the server are separated by origin.
@jackma887
@jackma887 4 жыл бұрын
hi nic~ What is the syntax of ch(sm) on line 61? Why can it be wrapped in parentheses
@dimayasnohurskyi2805
@dimayasnohurskyi2805 4 жыл бұрын
The same error with POST requests. Looks like in Validate functions at middleware.
@ariel._.9186
@ariel._.9186 3 жыл бұрын
Thanks man
@peterz1236
@peterz1236 3 жыл бұрын
Someone misclicked the like button
I Hate CORS.
7:52
Theo - t3․gg
Рет қаралды 74 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 79 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 15 МЛН
What is CORS?
13:22
A shot of code
Рет қаралды 68 М.
Golang Web Server and RSS Scraper | Full Tutorial
2:49:35
Boot dev
Рет қаралды 65 М.
Ask Me Anything
2:00:15
Nic Jackson
Рет қаралды 5 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 686 М.
Go Pointers: When & How To Use Them Efficiently
14:09
Anthony GG
Рет қаралды 88 М.
Build A Loadbalancer With Golang
32:18
Akhil Sharma
Рет қаралды 15 М.
Building Microservices with Go: 15. Refactoring Part 1/3
29:50
Nic Jackson
Рет қаралды 9 М.
Understanding Contexts in Go in 5(-ish?) Minutes
15:14
TutorialEdge
Рет қаралды 66 М.
A consistent logging format for Go
11:27
Google Open Source
Рет қаралды 22 М.
iPhone SE 2020 пролежал в коробке 4 года
0:54
ТЕХНОБЛОГ ГУБАРЕВ СЕРГЕЙ
Рет қаралды 3,4 МЛН