'Access-Co​ntrol-Allo​w-Origin'

About matlab production server config, I am quite sure that I have add --cors-allowed-origins * in the server config file, but the browser still show me: XMLHttpRequest cannot load http://localhost:9910/BondTools/pricecalc. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. Anyone could be helpful? Thanks in advance

2 Commenti

ruike
ruike il 16 Ago 2022
Hello, where is the --cors-allowed-origins * configured, I can't find the configuration file in my webapp project

Accedi per commentare.

Risposte (2)

mohammed
mohammed il 12 Mar 2018

1 voto

save the file in html, open the file with Internet exploler. that is how it works for me, modern browser requires a complex security headers.
Neeraj Rajpurohit
Neeraj Rajpurohit il 30 Giu 2020

0 voti

Hi,
In my opinion this is because you are accessing the API from a file. You will need to apply different solutions to different browsers, the below link will help you to get a deep understanding.
Thanks,
Neeraj

Categorie

Scopri di più su MATLAB Parallel Server in Centro assistenza e File Exchange

Richiesto:

il 15 Lug 2016

Commentato:

il 16 Ago 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by