Ukoliko se u konzoli veb pregledača javi greška tipa:“No 'Access-Control-Allow-Origin' header is present on the requested resource” , kontroler bi trebalo obeležiti:Choose one of the following answers. anotacijom @RestController anotacijom @CrossOrigin(origins = "*") anotacijom @RequestMapping("/api")
Question
Ukoliko se u konzoli veb pregledača javi greška tipa:“No 'Access-Control-Allow-Origin' header is present on the requested resource” , kontroler bi trebalo obeležiti:Choose one of the following answers. anotacijom @RestController anotacijom @CrossOrigin(origins = "*") anotacijom @RequestMapping("/api")
Solution
Kontroler bi trebalo obeležiti anotacijom @CrossOrigin(origins = ""). Ova greška se javlja kada pokušate da pristupite resursu sa različitog domena, protokola ili porta od onog na kojem se nalazi veb aplikacija. Anotacija @CrossOrigin(origins = "") omogućava pristup svim domenima.
Similar Questions
Manakah solusi yang tepat agar terlepas dari Same-Origin Policy?ACross-Origin PolicyBSame-Site Resource SharingCSame-Origin Resource PolicyDCross-Origin Resource Sharing
In a RESTful API, what is the primary purpose of using HTTP headers like 'Accept' and 'Content-Type'?This question is required.*ATo authenticate the user making the requestBTo specify the format of the request and response dataCTo indicate the status of the requestDTo provide routing information for the API gatewayENot SureOK
What is the primary purpose of a response header in a RESTful API? Question 6 options: To store user information for future requests To define access permissions for the resource To tell the client application what data to expect To contain the requested resource data
What does CORS stand for?Create-Object Resource SharingCross-Origin Resource SharingCross-Origin Route SharingCross-Operator Resource SharingI don't know
What request methods does this line of code below [email protected]('/test')
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.