Skip to content
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

Merged
merged 2 commits into from
Aug 18, 2020
Merged

Conversation

regmagik
Copy link
Contributor

…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.

…end URL. GitHub issue: Posting to /publish endpoint results in Resource not found. Azure#826
@ghost
Copy link

ghost commented Aug 17, 2020

CLA assistant check
All CLA requirements met.

@mikebudzynski
Copy link
Contributor

Thank you @regmagik - we'll review your PR this week.

@mikebudzynski
Copy link
Contributor

@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
@regmagik
Copy link
Contributor Author

@mikebudzynski - yes, Mike, I removed that section from readme.md file.

@mikebudzynski
Copy link
Contributor

@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.

@regmagik
Copy link
Contributor Author

regmagik commented Aug 18, 2020 via email

@ghost
Copy link

ghost commented Jul 9, 2021

@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?

  • Your email address
  • Your GitHub username
  • This pull request number

ygrik pushed a commit that referenced this pull request Apr 1, 2022
* 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
ygrik pushed a commit that referenced this pull request Apr 4, 2022
* 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
jsorohova pushed a commit that referenced this pull request Apr 14, 2022
* 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
maciejtreder pushed a commit that referenced this pull request Jun 13, 2022
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants