-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix publish website "not found" error #834
Conversation
…end URL. GitHub issue: Posting to /publish endpoint results in Resource not found. Azure#826
Thank you @regmagik - we'll review your PR this week. |
@regmagik - can you please remove the readme.md change? Our goal is to keep readme as concise as possible, we'll the text to Wiki. |
Removed section about CORS - it will be moved to the Wiki
@mikebudzynski - yes, Mike, I removed that section from readme.md file. |
@regmagik We merged your pull request - thanks for the contribution. Can you explain what you meant by your proposed change to the readme file?
The code change is meant for the self-hosted portal scenarios only, while the publishing API call above is for the managed portal. |
Yes, Mike, the code change only affects the self-hosted portal scenario.
Since there is no server-side code for self-hosted Developer Portal, the
Publish Website calls into the managed developer portal of the same APIM
instance. When this happens in a regular browser, like Chrome, the browser
blocks that call with CORS error displayed in the F12 Developer Tools
console and publish still does not happen.
I could not find a way to configure CORS for the publish method of the
managed developer portal, so the only solution I found (that allows publish
call work) is to run Chrome with additional parameters to disable CORS
check.
So when developers get the latest code and run it in localhost in a regular
browser, and try to publish, it is still not going to work (most likely).
But running in Chrome with CORS disabled works for me.
Does this explain better? If needed, we can connect on WhatsApp (
404-514-7980 ) or Webex and talk and share screens. I am in Atlanta GA, so
my time zone is Eastern Standard Time.
Thank you for accepting my PR.
Boris
Text: 404-514-7980 // Email: Boris@RegmagiK.com // Connect:
https://linkedin.com/in/borisguzner
…On Tue, Aug 18, 2020 at 3:25 PM Mike Budzynski ***@***.***> wrote:
@regmagik <https://github.com/regmagik> We merged your pull request -
thanks for the contribution.
Can you explain what you meant by your proposed change to the readme file?
When opening localhost designer and trying to publish you may get CORS error:
Access to XMLHttpRequest at 'https://apimboris.developer.azure-api.net/publish' from origin 'http://localhost:8080' has been blocked by CORS policy: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response.
One way to solve this error while publishing from localhost:8080 is to disable CORS by passing parameters to Chrome via command line. For example, run the following command as administrator:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=c:\users\cors-off
The code change is meant for the self-hosted portal scenarios only, while
the publishing API call above is for the managed portal.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#834 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJMZIXWWHMJGZBX3UL52ULSBLITLANCNFSM4QBEQLBA>
.
|
@regmagik, in recognition of your contributions, we would like to offer you a small token of appreciation. Could you send us the following details to apimportalfeedback@microsoft.com by Sunday, July 18th?
|
* fix publish website not found error by doing publish to the APIM backend URL. GitHub issue: Posting to /publish endpoint results in Resource not found. #826 Removed section about CORS - it will be moved to the Wiki
* fix publish website not found error by doing publish to the APIM backend URL. GitHub issue: Posting to /publish endpoint results in Resource not found. #826 Removed section about CORS - it will be moved to the Wiki
* fix publish website not found error by doing publish to the APIM backend URL. GitHub issue: Posting to /publish endpoint results in Resource not found. #826 Removed section about CORS - it will be moved to the Wiki
* fix publish website not found error by doing publish to the APIM backend URL. GitHub issue: Posting to /publish endpoint results in Resource not found. #826 Removed section about CORS - it will be moved to the Wiki
…by doing publish to the APIM backend URL. GitHub issue: Posting to /publish endpoint results in Resource not found. #826
I also updated the Readme file because this fixed version causes CORS error. I could not find a way to configure CORS for the publish method to work, so I temporarily disable CORS for publishing developer portal.