0:00:29
what is going on guys welcome back to
0:00:32
another session of raw coders build
0:00:40
today as you all know my name is zane
0:00:45
co-host you i've observed there's only
0:00:47
me one person we're usually two people
0:00:50
so me and my co-host
0:00:52
who is karthik and um he's not available
0:00:56
today because he has an exam
0:01:00
uh he wanted to focus on that but he
0:01:05
turn up as soon as he can so
0:01:11
just a bit of a recap for
0:01:14
from just today what we did was
0:01:17
updated the get specific board
0:01:23
i went a bit too fast there um
0:01:28
so i'll just tell you the new timings
0:01:31
first of all for our show it's um every
0:01:38
no sorry my bad is
0:01:41
from 9 30 to 10 30 every weekday and
0:01:46
from 9 30 to 11 every weekend yes you
0:01:50
have heard it right it's
0:01:52
1.5 hours instead of two hours um and
0:01:56
the reason we actually
0:01:59
shown the time on the weekends is
0:02:01
because we felt that we were really
0:02:05
uh on and wasn't really been being put
0:02:08
wasn't really being productive
0:02:10
in that half an hour so we want to
0:02:16
we wanted to utilize that half hour to
0:02:20
do a bit more productive
0:02:24
and that was the reason why all right
0:02:28
and now that the updated timings are
0:02:31
across to you guys um i'll just do a bit
0:02:34
of a recap of what we did
0:02:40
we actually updated our guest specific
0:02:44
function in the express app um to take
0:02:53
instead of the board id all right
0:02:56
from the front end we're passing board
0:02:59
name so we don't need
0:03:01
uh board id to be taken in the get more
0:03:05
specific function of the express
0:03:11
turned out pretty well because we got it
0:03:13
done it's working and according to our
0:03:16
design we need to now
0:03:19
implement um the get border
0:03:27
bored name function in our middleware
0:03:31
which is the fetch api so that's exactly
0:03:34
what we're good what we're going to be
0:03:41
without further ado
0:03:43
let's get started and jump in into the
0:03:50
let's get out all right i'll share my
0:03:52
screen which i have already
0:04:00
and do a cd12 workspace to get all the
0:04:05
that we need to work on so that would be
0:04:17
middleware post board
0:04:26
pose bad implementation for pause mode
0:04:30
right um i think we're gonna create
0:04:37
all right um that branch will be
0:04:45
i just want to check if
0:04:48
the main branch has the latest code all
0:04:57
take it from there
0:05:08
ask master bro no it should be main
0:05:14
there we go and your branches
0:05:18
none of the changes have been committed
0:05:21
in the main branch
0:05:27
so i'm just thinking that which branch
0:05:31
code because we need to be
0:05:41
we need to create another branch
0:05:45
work on the new functionality i don't
0:05:48
want to insert the get born name name
0:05:51
functionality into this
0:05:55
all right so how about if you create
0:05:57
another branch here
0:06:17
okay that's all really yeah fetch api
0:06:23
actually that's all right i'll create
0:06:34
error pause did not match any file to
0:06:41
i think i needed to do
0:06:47
switch to a new branch cool and then
0:06:52
want to see where the code of this is um
0:07:06
guys the lightning is really bad on on
0:07:09
my end i can tell you can hardly see my
0:07:13
i have actually ordered the sport live
0:07:19
hopefully that is on the way and
0:07:24
the lighting should be good
0:07:28
i would say anytime next week okay
0:07:36
just a bit of a disclaimer that um i'm
0:07:41
it's only me today as you already know
0:07:44
so i'm going to be talking about any
0:07:47
time if you're sick of me talking just
0:07:49
let me know i'll i'll point some really
0:07:52
cool music all right
0:08:02
it's a postman is we're
0:08:04
already there okay so those
0:08:06
changes are definitely not here
0:08:09
so what actually i'm gonna do i'm gonna
0:08:14
uh create i'm gonna open up
0:08:25
and then i'm gonna try and merge our
0:08:28
latest code with the
0:08:30
branch that we have at the mo as in into
0:08:41
so this is our main branch at the moment
0:08:44
and we what we want to do is
0:08:51
we want to i think this one has a less
0:09:01
this one must have less code
0:09:08
let's check if it does
0:09:12
api no index middleware
0:09:17
board name value yeah
0:09:19
yeah this was it so this is our
0:09:24
thing so how about if we
0:09:27
create a pull request
0:09:30
for this branch and emergency master
0:09:34
let's do that click back and it's in
0:09:36
another repo yep that's
0:09:46
okay could choose branch pause bold name
0:09:54
this isn't anything to compare switch to
0:10:07
bronze compartment main
0:10:27
no that isn't in dev
0:10:31
so we can't do this part here
0:10:37
that is an x um actually middleware
0:10:40
implementation updating the middleware
0:10:42
finish port post api
0:10:53
no this is not the one
0:10:56
i think that one is the one that we need
0:10:58
to be merging into our
0:11:15
for request actually i need to check how
0:11:21
with master branch
0:11:38
rice surface vegemite
0:11:48
test portal origin
0:11:51
push origin mask test
0:11:57
how i would do this is so it's checking
0:12:00
the master he's pulling origin master
0:12:05
and then get most tests
0:12:07
get okay cool so we need to do this so
0:12:10
i'm going to check out get origin
0:12:15
you check out master
0:12:24
yeah that's fine it's a main branch not
0:13:03
yeah this is fine cool
0:13:09
this is all right this is exactly what
0:13:25
let me just run this and see
0:13:28
if even i've actually got the right one
0:13:33
write code into the main
0:13:40
i'm just running the
0:13:49
so where to test it
0:13:58
one two three home
0:14:06
the board and if i do
0:14:11
that should go in the div itself
0:14:15
and this page should go to the
0:14:42
um apparently i've got the wrong thing
0:15:05
let's go to our branch which was
0:15:32
now i need to go and see the client
0:15:56
one and now open that one up
0:16:58
header is present on the
0:17:07
what have i done here
0:17:17
this was working before
0:17:26
hang on let me just check
0:17:33
it's actually working test
0:17:40
because i want to know
0:17:43
if it's even working then testing
0:17:48
board name board name
0:17:51
testing board name one string
0:18:11
so where is this going
0:18:50
so the board name was working it was
0:18:54
taking the board name perfectly fine
0:18:57
what happened to it now
0:19:00
actually i'm gonna go back and see
0:19:03
what's happening in this
0:19:06
main branches that one does this have
0:19:10
my requests yet so i did do it
0:19:17
merge is already there
0:19:26
this is already there
0:19:28
everything is there
0:19:30
yeah so it's actually merged into the
0:19:36
so we just have to go to the master and
0:19:42
let's go to the master and check
0:19:58
i'm missing anything that's not working
0:20:05
this is really interesting honestly
0:20:12
maybe i need to hard refresh it first
0:20:18
let's try that as well
0:20:36
it's a cause error again
0:20:40
has been blocked by course policy
0:20:46
with cause disabled
0:20:53
middleweight poster error field
0:20:59
so it's a call there again
0:21:01
if i do here nor cause
0:21:04
then what does it do
0:21:13
uh actually by the way by the way
0:21:18
switch to the new branch that i just
0:21:25
get away get bored name
0:21:51
i don't want to make any changes for now
0:21:56
it let's actually forget the changes
0:22:01
because i wanna i don't wanna do
0:22:04
this in a development branch uh
0:22:06
in the main branch so just create that
0:22:16
check out actually
0:22:21
call get board name
0:22:36
why did i delete that
0:22:40
no no no no why did i delete
0:22:47
that's not supposed to be happening
0:22:52
hang on get check out
0:22:59
yeah middleweight is there already which
0:23:02
is fine and now if we move to
0:23:14
middleways in there
0:23:19
this sir hasn't been done properly so
0:23:23
delete this branch
0:23:27
this is remotely i it's only local at
0:23:39
how to delete a branch i need to check
0:23:41
the command for how to delete a branch
0:24:08
okay we go so local branches that one
0:24:15
first of all we need to
0:24:17
go to our main branch
0:24:25
what is that branch
0:24:34
and then the branch name which is that
0:24:45
get bored name has been deleted now we
0:24:47
will do a get pull again for the main
0:24:51
hopefully this is already up today and
0:24:58
to a new branches get bored
0:25:23
branch that one we needed to insert that
0:25:28
okay cool so now we are on get branch
0:25:35
simply run the app first
0:25:49
all right and then we go to our app
0:25:53
hard refresh it oh my my why is this
0:25:58
causing the problem
0:26:03
i'm just gonna have some more in my
0:26:15
i have to say hydrate always
0:26:19
all right so one two three
0:26:25
i swear it was working fine before
0:26:29
and then we were able to post
0:26:40
all right let me do
0:26:46
this and see if that
0:26:50
because i'm pretty sure it was working
0:26:55
i will get rid of all these
0:27:28
what is happening to my project
0:27:32
it was the post was working before but
0:27:45
why is this thing would change as in the
0:28:02
is interesting it just worked
0:28:04
ah because i'm using no calls that's why
0:28:09
interesting all right
0:28:12
we can obviously come back to no cause
0:28:17
because that's not really an issue at
0:28:20
the moment but when we going to be the
0:28:23
testing or releasing
0:28:26
app then we will be implementing
0:28:30
cause because we want to make sure
0:28:34
no one can access the endpoint
0:28:37
um where they're not supposed to all
0:28:43
let's do that and i'm pretty sure that's
0:28:46
working now so i'll just
0:28:50
do the api and see if this works
0:29:05
what i just did one two three isn't it
0:29:10
if that did the trick
0:29:12
because we should get our board
0:29:15
we should get a board one two three
0:29:18
board name as in one two three
0:29:20
port id board name that's my car is this
0:29:25
board name board name
0:29:28
i need to turn on my json formatter
0:29:34
there we go it's a lot easier now isn't
0:29:39
name gone for one two three
0:29:42
it's not coming up
0:29:44
this is interesting i need to do that
0:29:50
i need to check for that
0:30:05
this is definitely interesting
0:30:09
let's do that one more time
0:30:17
actually hard refresh
0:30:20
so it clears out the cache as well
0:30:24
actually i don't i don't really
0:30:26
know if by doing a hard refresh it
0:30:28
clears out the cache
0:30:32
confirm that first so one two three
0:30:41
so that's there so now if i go to the
0:30:45
should give me board name one two three
0:30:53
no it's not giving me
0:31:01
i swear that exactly how it was
0:31:20
yeah value board name
0:31:23
no cause board name
0:31:33
let me just go and check
0:31:49
and see what's happening there because
0:31:51
it's supposed to be sending the board sh
0:31:54
as in supposed to show us the board name
0:32:37
just want to check if the board name one
0:32:39
two three has been shown there and my
0:32:42
laptop's battery is
0:32:44
dying so i need to put this one on
0:32:55
right go to tables
0:33:03
i've got to plug in the cable properly
0:33:09
that was why i wasn't charging
0:33:19
it's not showing bored name
0:33:22
this is really interesting
0:33:53
one two three and then press goal
0:34:02
some problem no longer general
0:34:04
consummate by surface in the issues tab
0:34:07
right let's go to the issues
0:34:10
where is the issues tab
0:34:14
ah here we go audit uses of
0:34:17
navigator use agent i think they
0:34:20
shouldn't really have anything to do
0:34:23
but is that being inserted in there
0:34:32
board id board name board notes
0:34:58
i sway was working the previous time we
0:35:07
this is getting this is getting very
0:35:09
interesting honestly
0:35:14
let's check what what does
0:35:17
lambda logs show us
0:35:24
yeah that's the one i need
0:35:34
i was really hoping we could do the get
0:35:37
bored name function in
0:35:40
the middle as well today
0:35:42
it seems seems like that's not gonna
0:36:03
well we'll make it happen
0:36:08
would be to fix the board name up
0:36:15
gap or name function in the middle of it
0:36:18
but first we need to focus on this
0:36:21
all right i'm gonna just check was the
0:36:33
ah right i think i might know what the
0:36:40
so lambda isn't showing up anything here
0:36:48
what might have been happening
0:36:52
um i'll open up a new window of
0:37:04
vs code and then open up the api in that
0:37:16
i need to check if
0:37:21
the updated code off
0:37:24
um that wouldn't be the problem because
0:37:28
hang on if if in posts man it works then
0:37:32
i don't see any pr
0:37:34
i don't i think there's a problem
0:37:39
let's just check first
0:37:41
this is the previous api
0:37:56
um i'm gonna just check if in the
0:38:01
express api is working properly
0:38:04
and it is actually inserting
0:38:16
all right it's a board board
0:38:23
single note don't need this
0:38:27
okay so it's a board name
0:38:42
and simply pause this
0:38:46
and she give me my board
0:38:49
name in all of them
0:38:51
let's see if it did
0:38:59
all right we can't connect to the server
0:39:01
because there might be too much traffic
0:39:04
or configuration right
0:39:06
so apparently it's the
0:39:10
problem in the api
0:39:14
aws itself apparently
0:39:18
but i find that hard to believe
0:39:20
that there's a problem in the api itself
0:39:31
can't give your body that's probably
0:39:39
yeah so the api is working fine as you
0:39:48
inserting the board name
0:39:56
okay how about if we delete all the
0:40:15
okay this is that one
0:40:18
let's do this home.html
0:40:25
okay one two three
0:40:36
cause errors still appears
0:40:47
this is really really interesting for me
0:40:50
at the moment you have no idea
0:40:53
it's it's working now
0:40:57
i'm gonna do this so at the moment
0:41:01
there are no items here okay bear that
0:41:04
in mind so if i go back again
0:41:11
actually i'm gonna even close that
0:41:16
and then what i'm gonna do is
0:41:36
come on there we go
0:41:46
zero zero zero on the html
0:41:57
just to make sure again that there's
0:42:00
in the in dynamodb saying
0:42:18
go back in dynamodb and check if it's
0:42:23
right it wasn't there see
0:42:26
it's not there it doesn't come up
0:42:36
always right it doesn't come up
0:42:41
uh to do another one probably
0:42:49
and maybe do this time one two three
0:42:59
yeah cool so post isn't working
0:43:08
but what is there or do we
0:43:16
just want to check that
0:43:25
don't care about this
0:43:36
and now we do want to free
0:43:38
what does it come up as
0:43:40
ah so it doesn't come with a
0:43:46
so we again get getting
0:43:54
which is what was the problem it way in
0:44:02
interesting for us
0:44:05
okay cause how about if we do this with
0:44:10
and see if that one does the trick
0:44:20
okay go back in the
0:44:24
console as in in the browser
0:44:35
no obviously because i spelt incorrectly
0:44:44
all right cool so if i do one two three
0:44:56
what does it give us
0:44:59
does it does it give us no all right
0:45:07
is causing the issue now
0:45:11
what does the error come up has
0:45:20
actually what i'm gonna do
0:45:37
and do the post again
0:45:44
i want to record and see the error
0:46:02
ah okay of course you press record
0:46:14
so this is our error
0:46:18
no access control region headers present
0:46:20
on the requested resource
0:46:34
as a control allow region
0:46:38
needs to be present
0:46:50
it's printed on the requester resource
0:46:55
serves your needs set the request mode
0:46:59
no cost to faster requests resource
0:47:04
to fetch the resource with course
0:47:15
so we are doing the post first and then
0:47:19
post we're gonna go click
0:47:24
so if if we do the
0:47:27
course one actually
0:47:31
let me do one thing
0:47:34
i won't allow cause
0:47:42
and then run this thing
0:47:56
now i'm gonna do that again and see if
0:48:19
gonna open in incognito mode
0:48:40
this is exactly the one we want
0:48:59
okay that goes in there cool and now go
0:49:02
back in our database
0:49:05
and check if we have one two three
0:49:09
no we don't have one two three okay so
0:49:11
that is the problem
0:49:16
this is some weird thing that i've
0:49:26
check what's happening
0:49:28
actually have i even got the table name
0:49:43
yeah that's that should be okay because
0:49:46
in the api it's working
0:49:57
let me just check uh
0:49:59
what are we doing in the api thing
0:50:03
because this was working before to be
0:50:14
i've got the calls enabled
0:50:53
this is our scramble api
0:51:02
in confirmation are the api
0:51:07
we have to figure out what's
0:51:10
causing that not to work
0:51:12
yeah calls are enabled
0:51:16
which is absolutely fine
0:51:34
this is a bit interesting
0:51:37
it will cause that one
0:51:44
i think that might be the reason why
0:51:47
it's not working apparently
0:51:55
this was in the problem before but now
0:51:58
it's recently become one
0:52:00
that is controlled to options options
0:52:30
known apis is here
0:52:34
let's check method response
0:52:37
and response two to two
0:52:44
oh this might be the reason why
0:52:48
it doesn't have the headers but am i
0:52:52
ah it's not the right
0:52:57
right api isn't it
0:53:00
w7 w7 yeah it's the right one
0:53:04
so apparently i don't have
0:53:06
the headers here cool
0:53:10
i need to do that one now
0:53:32
no knowing cook me so
0:53:41
so we need to allow access
0:53:46
what was that actually i need to do this
0:53:54
no post yeah i need to do post first
0:54:13
invalid don't care about this one
0:54:16
post proxy yeah there you go
0:54:19
so i need the lambda to come there
0:54:26
which would be from
0:54:39
i'll just go to cloud formation and then
0:54:51
wow seems very just backtracked a bit
0:55:02
ah so when i actually deployed
0:55:05
but it was working
0:55:09
thinking when i deployed the app before
0:55:18
it must have been the problem over there
0:55:21
isn't it overrode the
0:55:27
settings of the headers that didn't they
0:55:48
okay as soon as this lambda function
0:55:52
wow this is incredibly as in
0:55:56
backtracking but don't worry
0:56:05
there's some just a matter of time
0:56:09
where's our api gateway
0:56:11
there you go that's our
0:56:28
because you want the post method wasn't
0:56:30
attached in the first place
0:56:32
that's why was creating a bit of a
0:56:47
that's where type 10
0:56:51
that one method response is there
0:56:56
right um so what we need now
0:57:11
so this is fine now
0:57:17
your resource has been configured for if
0:57:20
you see any areas in the apple
0:57:22
do that all right how about if i try it
0:57:24
now if you just configure the api
0:57:35
let's try and serve the request now
0:58:05
okay so still errors
0:58:12
okay we wanted to work with the chords
0:58:17
of course there you go
0:58:22
we need the arrow with the cause
0:58:52
that doesn't work either
0:59:23
go go go go method go
0:59:38
we don't really need jetboards at the
0:59:43
just go at the moment
1:00:14
okay we wanted these allow access
1:00:18
control header in present
1:00:21
so we'll get that one sorted
1:00:40
default default here
1:00:43
core everything is there
1:00:48
so this is done as well
1:01:06
there we go and enable course for any as
1:01:09
well i just do for everything
1:01:17
cool there you go any options and that
1:01:20
there too and enables calls for this one
1:01:32
and then deploy api
1:01:42
there's no problem is deploying let's
1:01:45
see if this does the trick
1:01:49
because i'm pretty sure the api endpoint
1:01:51
is working fine is the
1:01:53
is the course thing that's
1:01:57
it's the course thing there sectioning a
1:02:05
and this end point here
1:02:11
tracking is there already
1:02:15
let's try again and see if
1:02:18
that one does it for us
1:02:41
okay one two three
1:02:45
access to from it has been blocked by
1:02:47
code response to clean file
1:02:49
ah so still has been blocked by course
1:02:59
ah i need to do the http okay status in
1:03:30
come on come on post
1:03:38
this is interesting
1:04:00
that's fine had a mapping
1:04:03
yeah it does have everything here
1:04:06
allows this control region
1:04:25
i can't see it cannot be compared to to
1:04:28
transform responses
1:04:52
must have been it 200
1:05:04
http status any method
1:06:03
now what we can do is deploy the app
1:06:18
and see what do we get
1:06:47
access to fair chat that one
1:06:50
from a region this one has been blocked
1:06:52
by call response to click preflight
1:06:56
request doesn't pass access control
1:06:58
check does not have http okay status
1:07:15
what does this mean
1:07:20
doesn't have okay status
1:07:37
and this is the simplest example
1:07:48
add header of course you can allow
1:07:52
any header and method you wish
1:07:55
end of june we use gorilla
1:08:07
what happened here
1:08:13
okay dot json control is that one
1:08:23
but this was working before isn't it
1:08:33
actually let me go back in that other
1:08:37
branch you check out
1:08:59
check this one out
1:09:01
how does this work because this is the
1:09:03
original price that had the solution in
1:09:44
it does not have http okay
1:10:04
it does not process its control
1:10:07
right where are we
1:10:12
until for no content
1:10:37
for requests use this course
1:10:40
peer feature or fetch api's just class
1:10:45
it's access control example versus
1:10:48
control scenario simple request
1:10:52
since some requests don't require course
1:10:56
preflight those are called simple
1:11:01
especially different course doesn't use
1:11:04
as in progress is the one that meets the
1:11:07
following condition
1:11:09
one of the loud gap method yeah i'm
1:11:13
so how do we do this
1:11:16
apart from headers ultimately set by you
1:11:27
um the only headers which are allowed to
1:11:30
be set manually are
1:11:36
content types will accept
1:11:46
get that one get this one
1:11:52
pre-flight uh-huh main request
1:12:01
right this is the one that i'm
1:12:04
i'm at http 200 okay
1:12:23
allow head is that one
1:12:41
so how about if i just
1:12:48
i was thinking that how about if i exp
1:13:00
access control origin
1:13:04
just putting a stop but that's not our
1:13:06
our problem our problem is
1:13:19
doesn't pause access control check it it
1:13:22
does not have http okay status
1:13:25
so we need to add the status of http
1:13:33
okay let's go back to
1:13:36
that one how to add a status of
1:13:43
actually this is not giving me anything
1:13:49
response to preflight this
1:13:51
might have something
1:13:54
in the back for us
1:14:01
it does not yeah this is exactly our
1:14:07
and this is my course
1:14:12
yes did you clear the config cache
1:14:18
configuration could be a thing as well i
1:14:23
like yes like a thousand times i tried
1:14:25
using postman and the request is
1:14:31
the project in local is successful
1:14:35
the issue is when i test on the server
1:14:39
i have the same issue i solved the
1:14:41
problem actually i have a different one
1:14:46
in my front end i hit
1:15:00
and then but works perfectly if i do not
1:15:05
but at the front and i he appeared with
1:15:08
and it acts perfectly if i don't use it
1:15:15
so however if we do this
1:15:18
no that doesn't work for us clearly
1:15:31
right that stopped
1:15:34
no no no no no no sorry
1:15:51
no that won't work obviously
1:15:54
because that doesn't even exist
1:16:08
in this same in someone's cases
1:16:11
in in case owners face the same mind
1:16:17
incredibly stories totally unrelated to
1:16:22
this is interesting
1:16:25
bootstrap care storage
1:16:28
took me a day to realize that was the
1:16:33
it can be simply solved by following
1:16:38
shortcut google chrome update
1:16:42
object chrome installation path
1:16:44
accordingly with the following
1:16:54
apparently that doesn't work
1:17:04
that will not fix the issue for
1:17:06
consumers of the api people on regular
1:17:11
that's for development yeah obviously
1:17:14
that's for developers
1:17:18
i mean i'm facing the microphone
1:17:22
poster would you know how to solve the
1:17:28
okay now i wasn't expecting this stream
1:17:31
to go in this way um
1:17:35
so fixing cores in javascript
1:17:39
so we just have to add
1:18:04
run that one how to build
1:18:08
had to solve a simple cause issue
1:18:14
block right now question huh
1:18:20
i mean i was facing that but
1:18:24
that's the position
1:18:28
uh-huh that's not the one
1:18:30
or although we have fixed the main cause
1:18:32
and there are some limitations
1:18:36
http get and options method allowed
1:18:39
one of them is the only
1:18:43
methods of read only questions say that
1:18:45
the number the person delete method can
1:18:48
add or change uh-huh they're considered
1:18:54
let's see what happens when we make a
1:19:01
um this is the headers
1:19:11
yeah there there you go
1:19:27
there's no one all one is
1:19:30
has been blocked method is not allowed
1:19:33
method in a pre-flight
1:19:43
well what else cause block ours is a
1:20:07
come on i need this control somehow
1:20:13
oh what would say hang on a minute i'm
1:20:15
gonna go back there
1:20:24
it does not have hp okay access
1:20:39
response for play pre-flight
1:20:46
okay i have a funny
1:20:51
oh i was missing a room so that was so
1:20:54
lucky to be able i can't go
1:20:58
the cause control requires an
1:21:02
may be required for on the previous
1:21:05
req ah options request so i think the
1:21:12
here needs to have a 200 status i'm
1:21:22
does it not already have it
1:21:24
integration response
1:21:26
yeah this is there
1:21:32
yeah 200 response status
1:21:39
it does say options
1:21:47
positive control it does know okay
1:21:51
cool say i think i need to
1:21:58
this 200th status for every every one of
1:22:04
does post also have it
1:22:23
http state post has it
1:22:25
but it doesn't have all the origin
1:22:28
asset control ah content type
1:22:31
i think this might be it
1:23:00
let's create this model
1:23:10
because it's a post request
1:23:12
i think we need to add a bit there as
1:23:16
as an update the response
1:23:21
to have that model response model
1:23:24
so this would be application
1:23:32
maybe let's see there's no i'm trying is
1:23:45
http stages which i've actually
1:23:49
given out and i think
1:23:53
this must be the one they was
1:23:59
anything here that i need to change
1:24:04
http request headers
1:24:25
wasn't going in there no
1:24:29
questioning http headers
1:24:42
that that's the lambda that's fine
1:24:46
and massive response
1:24:53
i think this has to
1:24:55
allow more of those
1:25:00
i'm going to actually do is enable
1:25:05
and see what does it do
1:25:20
does it do that now
1:25:39
which of the methods
1:25:41
have all of this circuits copy and paste
1:25:48
in the post method
1:25:52
uh here we go this is exactly what i
1:26:12
content type application
1:26:34
i think all these have to be this
1:26:36
same for all of them
1:26:44
let's see by doing if that's the case
1:27:13
take this one as well
1:27:17
methods i've done that
1:27:29
cool go back to post
1:27:47
come on dude come on
1:28:04
so now that's there
1:28:06
i'm gonna just confirm that if
1:28:10
annie has all the response headers as
1:28:21
doesn't have anything cool
1:28:24
let's insert this one in
1:28:39
get the other one as well
1:28:56
you know what i'm gonna do get my sticky
1:29:00
oh and just paste inside
1:29:03
instead of going back and forth
1:29:20
i'm gonna just paste on my different
1:29:23
screen because i don't want to go back
1:29:25
and forth on every time
1:29:30
all right there we go now headers
1:29:57
come on annie come on
1:30:00
show me some loving
1:30:05
show me some loving oh yeah show me some
1:30:08
loving oh yeah show me some loving oh
1:30:11
yeah show me some loving oh yeah he
1:30:14
showed me some loving that's brilliant
1:30:29
that works as well
1:30:38
so now if we carry on and deploy it
1:31:27
there you go and now deploy it
1:31:32
let's see what happens
1:31:41
hopefully it works now
1:32:06
let's check if you still get the cause
1:32:12
it does not have an http okay status
1:32:17
why does it not have
1:32:18
access to fetch at
1:32:24
from a region that one has been blocked
1:32:29
responsibility does not have any
1:32:35
access to response preflight how to
1:32:39
just be okay stairs in cause
1:32:45
okay that didn't work
1:32:50
when you access your backhand with
1:32:52
postman you're only sending will get the
1:32:54
browser group will send an options
1:32:57
without your your authentication header
1:33:00
and look for response
1:33:02
to have a header that matches the origin
1:33:09
making the request okay
1:33:14
if the response to the option request is
1:33:18
not 200 or a headache no present
1:33:24
the error that you are experiencing and
1:33:26
the get request will not be made
1:33:29
change the back end to require
1:33:31
authentication for
1:33:33
options method when handling the logging
1:33:42
all right guys we'll
1:33:44
leave it at this stage
1:33:47
because it's already past 11
1:33:52
yeah and um i'll come back and do this
1:34:04
so thanks a lot for tuning in um it's
1:34:06
been good finding out that
1:34:13
where we actually are since this session
1:34:16
didn't really go as expected because i
1:34:22
sorry about that uh yeah cause i was
1:34:25
planning to do the
1:34:32
get a board and get a board by
1:34:35
a board name request in the middleware
1:34:38
method bob that bernie didn't turn up
1:34:40
because i found out the post method
1:34:43
isn't working properly in the middleware
1:34:47
we are not able to post
1:34:51
by the name of it all right and
1:34:55
it's experiencing some
1:34:58
data access control error which i'll
1:35:03
but yeah hopefully tomorrow my co-host
1:35:07
will be back as well and i really hope
1:35:09
this exam went really well
1:35:12
and um yeah i'll see you tomorrow back
1:35:15
here it's same time
1:35:17
same place and same task that we're
1:35:21
doing at the moment
1:35:22
all right until then have a great night
1:35:26
if you're all over the world it's
1:35:28
um have a good evening good morning good
1:35:34
depending on where you are but in terms
1:35:36
of melbourne australia it will be have a
1:35:40
i'll see you guys back again tomorrow
1:35:42
same time have a good night guys just