Click here to Skip to main content
14,689,263 members
Home » Discussions » JavaScript
   

JavaScript

 
AnswerRe: Opening an External URL Page in my Modal Dialog and capture some of the information that's being submitted to the parent React Pin
jkirkerx24-Oct-19 13:35
professionaljkirkerx24-Oct-19 13:35 
GeneralRe: Opening an External URL Page in my Modal Dialog and capture some of the information that's being submitted to the parent React Pin
simpledeveloper24-Oct-19 14:23
Membersimpledeveloper24-Oct-19 14:23 
QuestionCan ms blazor be next level of client-side coding Pin
simpledeveloper23-Oct-19 12:42
Membersimpledeveloper23-Oct-19 12:42 
AnswerRe: Can ms blazor be next level of client-side coding Pin
jkirkerx24-Oct-19 13:00
professionaljkirkerx24-Oct-19 13:00 
GeneralRe: Can ms blazor be next level of client-side coding Pin
simpledeveloper24-Oct-19 14:22
Membersimpledeveloper24-Oct-19 14:22 
GeneralRe: Can ms blazor be next level of client-side coding Pin
jkirkerx25-Oct-19 11:53
professionaljkirkerx25-Oct-19 11:53 
AnswerRe: Can ms blazor be next level of client-side coding Pin
Pete O'Hanlon5-Nov-19 1:45
subeditorPete O'Hanlon5-Nov-19 1:45 
GeneralRe: Can ms blazor be next level of client-side coding Pin
simpledeveloper5-Nov-19 7:09
Membersimpledeveloper5-Nov-19 7:09 
GeneralRe: Can ms blazor be next level of client-side coding Pin
Pete O'Hanlon5-Nov-19 21:40
subeditorPete O'Hanlon5-Nov-19 21:40 
QuestionOpen base64 encoded pdf file using javascript Pin
Member 1286358021-Oct-19 5:16
MemberMember 1286358021-Oct-19 5:16 
AnswerRe: Open base64 encoded pdf file using javascript Pin
jkirkerx21-Oct-19 13:22
professionaljkirkerx21-Oct-19 13:22 
AnswerRe: Open base64 encoded pdf file using javascript Pin
Richard Deeming22-Oct-19 2:15
mveRichard Deeming22-Oct-19 2:15 
GeneralRe: Open base64 encoded pdf file using javascript Pin
jkirkerx24-Oct-19 13:18
professionaljkirkerx24-Oct-19 13:18 
AnswerRe: Open base64 encoded pdf file using javascript Pin
Parth Munjpara23-Oct-19 0:11
MemberParth Munjpara23-Oct-19 0:11 
QuestionWant to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper17-Oct-19 14:27
Membersimpledeveloper17-Oct-19 14:27 
AnswerRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
jkirkerx21-Oct-19 13:11
professionaljkirkerx21-Oct-19 13:11 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper21-Oct-19 14:16
Membersimpledeveloper21-Oct-19 14:16 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
jkirkerx22-Oct-19 8:21
professionaljkirkerx22-Oct-19 8:21 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper22-Oct-19 9:56
Membersimpledeveloper22-Oct-19 9:56 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
jkirkerx23-Oct-19 7:55
professionaljkirkerx23-Oct-19 7:55 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper24-Oct-19 14:25
Membersimpledeveloper24-Oct-19 14:25 
Questionhas been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource Pin
simpledeveloper15-Oct-19 14:05
Membersimpledeveloper15-Oct-19 14:05 
AnswerRe: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource Pin
jkirkerx15-Oct-19 14:54
professionaljkirkerx15-Oct-19 14:54 
I don't think it has anything to do with the code you posted.

CORS means Cross Origin Request. It's a security feature that secures your API's access and is part of the API server and your code in React. It prevents someone from spoofing your API's

https://medium.com/@dtkatz/3-ways-to-fix-the-cors-error-and-how-access-control-allow-origin-works-d97d55946d9

I have an Angular Project wrapped in .Net Core which hosts the API's in a controller. Technically my project is using Kestrel as a web server. Kestrel is a lightweight blazing fast web server which will serve .Net Projects. In my case, I had to fully program Kestrel as a web server in Programs.cs and Startup.cs, and then align my Angular project to the API's so that I don't get a CORS error. So like services.AddCors is what you add to startup.cs. I had to do a few other things in Angular to get things to align as well. And write some code to handle developing in VS using localhost:5000 to the actual production URL.

I don't know how you structured your React application and back-end API so I'm not able to answer the question as a code fix.

At some point in time, your going to have to figure out how to handle SSL certificates, setup Kestrel and listening ports in .Net Core if that is what your using. You will have to figure out how to host it in a production environment.
If it ain't broke don't fix it
Discover my world at jkirkerx.com

AnswerRe: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource Pin
F-ES Sitecore15-Oct-19 23:14
mveF-ES Sitecore15-Oct-19 23:14 
AnswerRe: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource Pin
simpledeveloper16-Oct-19 8:10
Membersimpledeveloper16-Oct-19 8:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.