@Anil Sagar
I am trying to access an api proxy through dev-portal but I am getting an internal error. While accessing the same api proxy through Trace tool on edge works fine, giving 200 status code.
Can you tell how I should go about debugging this issue?
Solved! Go to Solution.
@Arun Kumar
Developer tool helped solving the issue. It was a mixed content error:
"Mixed Content: The page at
'https://<devportal>/<api>'
was loaded over HTTPS, but requested an insecure XMLHttpRequest
endpoint
'http://<edgehost/smartdocs/v1/sendrequest?targeturl=http%3A%2F%2F10.….
This request has been blocked; the content must be served over HTTPS"
So I changed my SmartDocs proxy URL to https (OneWay) and its working now.
Since most of the proxies are on 2WayTLS host, can you tell me a way to access that SmartDocs proxy using 2WayTLS URL?
Thanks for all the help!
@kkhanna ask the DevPortal administrator to validate:
The issue still persists. Checked all of the above steps -
Can you tell me where I can see the logs in order to debug the issue.
Thanks for your help.
@kkhanna There are a couple of things you can check:
1. Ensure that the smartdocs proxy url is configured correctly. You will see this setting at : admin/config/smartdocs . Proxy URL should be of the format "http://hostname:port/smartdocs/v1/sendrequest" , where "hostname" should resolve from the machine you are accessing devportal ( via the browser).
2. If the smartdocs proxy URL is configured correct, enable trace on the smartdocs proxy on edge and trigger a API request from devportal. Ideally you should see the call land on the smartdocs proxy.
Let us know if this helps.
Proxy URL is http://hostname/v1/proxyendpoint ( Its the same api proxy that works through trace on edge ). So am I doing something wrong.
@kkhanna I am referring to the Smartdocs proxy URL that is configured through Devportal. Please don't confuse it with the API proxy that you intend to invoke from devportal. All API calls that you try to access from Devportal gets proxied through the Smartdocs proxy ( Another proxy that is deployed on edge). This proxy adds support for CORS headers and then forwards the call to the API proxy published on the portal. Please refer to the attached screenshot to locate the smartdocs proxy URL configuration. Please ensure that this proxy is accessible from the system you are trying to access the devportal.
@Arun Kumar -
1. The URL configured through DevPortal is set to the smartdocs proxy URL deployed to org in edge-ui.
2. I do not see any call made to smartdocs proxy after enabling trace
Thanks for the help!
@kkhanna I am assuming that you tried invoking calls through portal when you had the trace enabled on the smartdocs proxy. This would indicate that the smartdocs proxy is not reachable from the system you are trying to access devportal from ( via the browser). You can confirm this by making the following curl call from the same system:
curl -X OPTIONS "https://{your_host}/smartdocs/v1/sendrequest" -v
Switch to http if you have don't have https endpoint. 200 response is expected. You would also see errors in the console tab of developer tools on your browser as well.
@Arun Kumar - Yes, I tried invoking calls through portal when the trace was enabled on the smartdocs proxy.
My setup : Node-1 > Router & MP, Node-2 > Router & MP, Node-7 > DevPortal & Management Server
Making call from DevPortal (Node7) while trace was enabled on smartdocs proxy results in nothing in trace session.
From DevPortal I ran `curl "http://<router-ip>:9001/smartdocs/v1/sendrequest" -v` and I am able to see the call in trace session. Since I didn't provide targeturl it results in 500.
@kkhanna Is possible for you to share the SmartDocs Proxy URL you have configured ? Also are you able to use developer tools on the browser to see the error getting logged ?
@Arun Kumar
Developer tool helped solving the issue. It was a mixed content error:
"Mixed Content: The page at
'https://<devportal>/<api>'
was loaded over HTTPS, but requested an insecure XMLHttpRequest
endpoint
'http://<edgehost/smartdocs/v1/sendrequest?targeturl=http%3A%2F%2F10.….
This request has been blocked; the content must be served over HTTPS"
So I changed my SmartDocs proxy URL to https (OneWay) and its working now.
Since most of the proxies are on 2WayTLS host, can you tell me a way to access that SmartDocs proxy using 2WayTLS URL?
Thanks for all the help!
@kkhanna Thanks for the update and glad that you were able to resolve the issue. Can i ask you to open a new topic on the community with the question around 2 way TLS for smartdocs ? This is unrelated to the original issue that was reported and hence would be better tracked as a new topic.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |