'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 件のコメント

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

サインインしてコメントする。

回答 (2 件)

mohammed
mohammed 2018 年 3 月 12 日

1 投票

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 2020 年 6 月 30 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeMATLAB Parallel Server についてさらに検索

質問済み:

2016 年 7 月 15 日

コメント済み:

2022 年 8 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by