I have installed the API manager 1.6.0 and got API Manager running as well. However the problem is IP address shown within store is the private IP of the server. Private IP is accessed via a VPN.
Below is the URL which is shown in the store as Production and Sandbox URLs,
http://192.168.6.162:8280/railway/2.0
For 192.168.6.162 I have assigned a public IP which is 103.11.35.xx and assigned a domain my-domain-name as well.
What I would like to see is as below,
http://my-domain-name/railway/2.0
How can I configure API Manager to show the domain name instead of an IP address with a port?
You can set this from api-manager.xml. Under APIGateway section there's the GatewayEndpoint element in which you can specify the URLs which should be shown in the store.
<APIGateway>
<Environments>
<Environment type="hybrid">
<Name>Production and Sandbox</Name>
<ServerURL>https://localhost:9445/services/</ServerURL>
<Username>admin</Username>
<Password>admin</Password>
**<GatewayEndpoint>http://localhost:8282,https://localhost:8245</GatewayEndpoint>**
</Environment>
</Environments>
<EnableGatewayKeyCache>true</EnableGatewayKeyCache>
<ClientDomainHeader>referer</ClientDomainHeader>
</APIGateway>
Edit api-manager.xml file located in WSO2-HOME/repository/conf, and set the GatewayEndpoint to http://mydomainname.com
<Environment type="hybrid">
<Name>Production and Sandbox</Name>
<ServerURL>https://${carbon.local.ip}:${mgt.transport.https.port}/services/</ServerURL>
<Username>admin</Username>
<Password>admin</Password>
<GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint>
</Environment>
Below Configuration worked for me.
You can also change the Hostname Value in carbon.xml with your Ws02 API Manager DNS entry or System Public IP address.
"<HostName>{hostname}</HostName>"
https://docs.wso2.com/display/AM210/Changing+the+Hostname
Related
Below issue was posted by me on https://github.com/XiaoFaye/WooCommerce.NET/issues/414 but since this may not be related at all to WooCommerce.Net but on a lowerlevel to Apache/Word/WooCommerc itself I am posting the same question here
I am really stuck with the famous error:
WebException: {"code":"woocommerce_rest_authentication_error","message":"Invalid signature - provided signature does not match.","data":{"status":401}}
FYI:
I have two wordpress instance running. One on my local machine and one on a remote server. The remote server is, as my local machine, in our company's LAN
I am running WAMP on both machines to run Apache and host Wordpress on port 80
The error ONLY occurs when trying to call the Rest api on the remote server. Connecting to the local rest api, the Rest Api/WooCommerceNet is working like a charm :-)
From my local browser I can login to the remote WooCommerce instance without any problem
On the remote server I have defined WP_SITEURL as 'http://[ip address]/webshop/ and WP_HOME as 'http://[ip address]/webshopin wp-config.php
Calling the api url (http://[ip address]/webshop/wp-json/wc/v3/) from my local browser works OK. I get the normal JSON response
Authentication is done through the WooCommerce.Net wrapper which only requires a consumer key, consumer secret and the api url. I am sure I am using the right consumer key and secret and the proper api url http://[ip address]/webshop/wp-json/wc/v3/ (see previous bullet)
I already played around with the authorizedHeader variable (true/false) when instantiating a WooCommerce RestApi but this has no effect
Is there anybody that can point me into the direction of a solution?
Your help will be much appreciated!
In my case, the problem was in my url adress. The URL Adress had two // begin wp-json
Url Before the solution: http://localhost:8080/wordpress//wp-json/wc/v3/
URL Now, and works ok: http://localhost:8080/wordpress/wp-json/wc/v3/
I use with this sentence.
RestAPI rest = new RestAPI(cUrlApi, Funciones.CK, Funciones.CS,false);
WCObject wc = new WCObject(rest);
var lstWooCategorias = await wc.Category.GetAll();
I hope my answer helps you.
Had the same issue. My fault was to define my url incorrect: http:// instead of https://.
All my requests logged on application insights have the 0.0.0.0 IP. Why?
Details:
- Running a app on azure app service
- Using .Net Core 2
- Other info seems ok, like, some requests from around the globe and etc
This is by design because of GDPR. from this blog post in february:
Starting February 5, 2018, Application Insights will set all octets of
the IP address collected by client/server side SDKs to Zero after
looking up the City, Country and other geo location attributes. This
strengthens privacy and is a change from the prior processing that set
the last octet to Zero.
This change is being made to address customer concerns with IP address
and the impact of GDPR.
Note:
• If you need the first 3 octets of the IP address, you can use
telemetry initializer to add a custom attribute.
• This does not
affect data collected prior to February 5, 2018.
The IP masking feature of Application Insights can be disabled.
Know your compliance requirements first before you do so!
There are two ways to do so:
First, make a REST call to reconfigure your existing App Insights instance
I suggest leveraging Azure CLI for that task, as you don't have to take care of the access token. Replace the missing values accordingly
<sub-id>
<rg-name>
<resource location>
az rest --method patch \
--url https://management.azure.com/subscriptions/<sub-id>/resourceGroups/<rg-name>/providers/microsoft.insights/components/<resource-name>?api-version=2018-05-01-preview \
--body { \"location\": \"<resource location>\", \"kind\": \"web\", \"properties\": { \"Application_Type\": \"web\", \"DisableIpMasking\": true } }
Second, use a custom TelemetryInitializer
public class CloneIpAddress : ITelemetryInitializer
{
public void Initialize(ITelemetry telemetry)
{
if (telemetry is ISupportProperties propTelemetry && !propTelemetry.Properties.ContainsKey("client-ip"))
{
var clientIPValue = telemetry.Context.Location.Ip;
propTelemetry.Properties.Add("client-ip", clientIPValue);
}
}
}
And than don't forget to register the type with the DI container
services.AddSingleton<ITelemetryInitializer, CloneIpAddress>();
The IP address will show up as a custom dimension
https://learn.microsoft.com/en-us/azure/azure-monitor/app/data-model-context#client-ip-address
Client IP address
The IP address of the client device. IPv4 and IPv6 are supported. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service. Application Insights extract the geo-location information from the client IP and then truncate it. So client IP by itself cannot be used as end-user identifiable information.
i have been directed by LinkedIn to this developer's blog. I want to give access to LinkedIn for certain users on a mobile network. This is why i would like first to know if they are static or dynamic, and if there is a predefined list which someone can share.
LinkedIn has a total of 6 AS Numbers:
AS13443
AS14413
AS40793
AS55163
AS197612
AS197613
For your ease, I have created a git repo with all the ipv4 and ipv6 ip addresses of LinkedIn, Facebook and Twitter. Please find them from the links below:
https://github.com/aarvee11/LinkedInIPLists
https://github.com/aarvee11/TwitterIPLists
https://github.com/aarvee11/FacebookIPLists
You may find a range of ips belonging to linkedin but it's not listed as ASN owner.
Here is an example of the case:
ASN AS10912 - Internap Holding LLC
Hostname No Hostname
Range 63.251.192.0/19
Company LinkedIn Corporation
I suggest using CIDR instead. Here ara more accurate ips of linkedin
8.22.121.0/24
63.251.195.64/29
64.124.192.64/29
66.151.157.240/29
91.225.248.0/22
108.174.0.0/20
144.2.0.0/19
144.2.176.0/20
144.2.192.0/19
144.2.224.0/21
144.2.232.0/22
144.2.236.3/32
144.2.236.4/30
144.2.236.8/29
144.2.236.16/28
144.2.236.32/27
144.2.236.64/26
144.2.236.131/32
144.2.236.132/30
144.2.236.136/29
144.2.236.144/28
144.2.236.160/27
144.2.236.192/26
144.2.237.3/32
144.2.237.4/30
144.2.237.8/29
144.2.237.16/28
144.2.237.32/27
144.2.237.64/27
144.2.237.96/28
144.2.237.112/29
144.2.237.120/30
144.2.237.124/31
144.2.237.127/32
144.2.237.131/32
144.2.237.132/30
144.2.237.136/29
144.2.237.144/28
144.2.237.160/27
144.2.237.192/26
144.2.238.0/23
185.63.144.0/22
199.101.160.0/22
202.177.212.160/29
204.51.86.192/27
216.52.16.0/21
216.52.242.0/24
216.200.149.0/24
Is there a reason you cannot allow access the domain name? E.g. www.linkedin.com (Or whatever domain the api is)
But, if you'd like to get the ip of a domain, you could use the ping command on windows cmd or linux/maxos bash, the output will be different depending on your system, but it should contain the numbered ip.
ping www.linkedin.com
How to Retrieve IP address on Meteorjs?. Any package is there?. Please advise.
Install the http package:
meteor add http
Then use it:
var result = HTTP.get("https://api.ipify.org");
console.log(result.content)
You can use the mizzao:user-status package to get the IP address of user. It is the standard package used to get such information about client-side user connection and status.
Install it with: meteor add mizzao:user-status
Then you can use the UserStatus.connections (in-memory) collection to get information for all connections on the server, in the following fields:
userId: the user id, if the connection is authenticated.
ipAddr:
the remote address of the connection. A user logged in from different places will have one document per connection. (This is the field you need)
One thing, from their documentation on Atmosphere site:
Note that to read client IP addresses properly, you must set the
HTTP_FORWARDED_COUNT environment variable for your app, and make sure
that IP address headers are forwarded for any reverse proxy installed
in front of the app. See the Meteor docs on this for more details.
Could any one help me in finding the solution for this error.
I have a normal web service which is working fine in intranet, when when the vendors try to access the same from internet, they get this below error.
There was an error downloading
'https://isite.corp.net/Service/Sample.asmx'.
The remote name could not be resolved:
'isite.corp.net'
Metadata contains a reference that
cannot be resolved:
'https://isite.corp.net/Service/Sample.asmx'.
There was no endpoint listening at
https://isite.corp.net/Service/Sample.asmx
that could accept the message. This is
often caused by an incorrect address
or SOAP action. See InnerException, if
present, for more details.
The remote name could not be resolved:
'isite.corp.net'
If the service is defined in the
current solution, try building the
solution and adding the service
reference again.
Does any one know the solution for this.
Thanks.
It seems like domain "isite.corp.net" (website) is not accessible from outside office network because error says "The remote name could not be resolved: 'isite.corp.net'". Please make sure your domain is public and can be accessible from outside. If it is not public, you have ask your vendor to put ipaddress mapping in host file.