All language subtitles for 022-Handling CORS Errors-git.ir

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

The last video we attempted to create a new post but we very quickly ran into a cause your quest aired.

This is a quick reminder on course requests for US requests are an issue.

Anytime that we are looking at some domain or domain with a port or domain with a subdomain that is

different than you are L or the domain that we're trying to make a request to.

So in our case in the browser we are at local host or three thousand and we are trying to make a post

requests to local host port 4000 those ports are different.

And so the course requests policy comes into effect.

The browser is going to automatically reject or prevent any request from being issued from Local three

thousand over to four thousand unless local is 4000.

Our server right here provides a very specific set of headers so in order to get this error right here

to go away there's nothing we could do inside of our browser.

There's no additional configuration we could add to our ReACT app or anything like that to make this

area go away.

We have to do some additional configuration on our server itself let's do that right now to get started

to flip back over to my terminal.

We're going to do this additional configuration on both our post service and the comments service.

It's gonna be a very small little piece of configuration so I'm going to find my turtle Windows running

my post service.

I'm going to stop that server and my comment server as well and then in both of these terminal windows.

So for both posts and for comments I'm going to run npm install force but there's one and there's two

very small package.

All it's going to do is help us get around this course air by setting a header on very specific risk

responses that are going to go back to the browser after that all start up my post service and I will

start back up my comment service.

Very good and I'm going to open up my editor in both these directories and we're going to make use of

that course module that we just installed all first start off with my post service.

Here we go some inside of my posts folder.

I'm in the index not j ust file inside there.

At the very top I'm going to require in course

and I'm going to wire that up to my express application as a middleware so we'll do apps use or is like

so and make sure you call cause as though it were a function I'll save that and I'm going to do the

same thing inside of my comments project as well.

They'll swap back over my comments project here's my comms project again inside of comments

at the very top I'm going to require in course

and again wired up to my app as a middleware and once again I'm gonna make sure that I call the cause

because it is a function save this and we should be good to go now.

Let's flip back over to our browser.

We're gonna try to create a post.

Once again this refund I'm going to refresh the page to get those nasty errors to go a while then enter

in a title here.

So as a first post the minute and there we go.

So my request was issued I got a response of two a one which means that my post was successfully created

Well this is definitely good progress forward.

And we got that little of course error to go away.

We're gonna make sure that if we start to add in any other services to our project we just add in that

course module from the gecko as we start to work on our later project.

So that big project that we're going to work on later on INSIDE the course we're not gonna have to worry

about this cause issue quite so much because there's a couple of little architectural changes we're

gonna add in here so that we will not end up making requests from one year old inside the browser to

some different you or L where our actual API is hosted.

We're gonna make a couple of changes that they're actually co-located so to speak.

All right.

So quick pause right here Mac the next video now that we've got that post creation put together we're

gonna start working on our post office component and then eventually make sure that we can add on the

ability to list out comments and create comments as well.

So I'll see you in just a moment.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.