Proxy or API Key redirect for URL - api

I have a requirement to set up a restriction to a public url/website. Unfortunately I do not have access to this server myself. My question would be if there is an API server I can host on e.g. Azure on which I can create API/URLs (maybe also with time limit) which I can enable and/or disable. These generated URL should simply redirect to the other URL.
See example image.
Many thanks

Related

Authenticate before Hitting External URL

I have a site hosted publicly with quite a complex name (including Guid) lets say Site_1, and I have another site hosted publicly at IIS with user friendly name lets say Site_2. I want to redirect my request coming to Site_2 for specific path to Site_1, without showing the address of Site_1 in URL, instead show the URL for Site_2.
On top of that I want to do an authentication before somebody can hit site Site_1, either via Site_2 or via copy pasting a URL for Site_1.
One of the solution that I have applied and achieved successfully is using NGINX Reverse Proxy and its basic or external authentication.
I am looking for example for doing same in IIS or any other platform, or any coding that needs to be done at Site_2.

Sharepoint URL redirection

I am trying to achieve URL redirection i want to know different possibilities to achieve this.
Scenario: I have created sharepoint web application(2013, host header site collection) with Annonymous access enabled and NTLM(windows authentication enabled--- Both are enabled). I have bind this site to certificate also and its working as expected if i browse the site with https://test.com
but if i just browse the site with http://test.com its asking me for user name and password. This i want to avoid even if i try to access http my requirement is it should redirect to https.
I have entered username and password and returns 200 http status.
I know there are options we can achieve this
1) IIS redirect
2) Through custom code snippet (C#/Javascript)
But apart from this is there any way we can achieve this like load balance or DNS etc
Your guidence will be really help full.
Regards
Sri
I think you can achieve this by addin an AAM (Alternate Access Mapping) setting in a sharepoint site.
Try to convert an Https request to the http in that. I haven't tried it myself so I am not sure if this will work or not, but there are some examples of a reverse which you want.
For your reference this is a link to make it for http to https
https://sharepoint.stackexchange.com/questions/64484/http-to-https-redirection-using-aam
Let me know the outcome.

Can't update app registered in Microsoft Application Registration Portal

I have an already registered app in the site https://apps.dev.microsoft.com. I want to add another redirect URL but when I tried saving I get this error:
There's a temporary problem
There's a temporary problem with the service. Please try again. If you continue to get this message, try again later.
I have also tried using a different browser and clearing my cache but I still get the error.
I also tried registering a new app and I still get the same error. I have been getting the error for several days now and I was wondering if anybody knows a solution.
Thanks!
There are several restrictions on the format of the redirect URI that is allowed
Currently, apps that are registered in the Application Registration Portal are restricted to a limited set of redirect URI values. The redirect URI for web apps and services must begin with the scheme https, and all redirect URI values must share a single DNS domain. For example, you cannot register a web app that has one of these redirect URIs:
https://login-east.contoso.com
https://login-west.contoso.com
The scenarios that are accepted are when the DNS name matches exactly. Examples:
https://login.contoso.com
https://login.contoso.com/new
https://new.login.contoso.com
See all the v2.0 limitations

url subdomain wildcard redirect

I read some of the answers related to the topic but my situation is a little different. I'm hosted on GoDaddy shared Linux hosting. Currently my application is setup to handle uri's as follows:
https://state.domain.com/region/client/xyz/function1
I want to change the application so the new url will be as follows. The change has been implemented and working for new clients but for my existing clients I want to this to be seamless without having them to update the url they are using to access the application. The new url would be:
https://country.domain.com/state/region/client/xyz/function1
We have quite a few clients that are using the application and I was wondering if we can use wildcards to create generic redirection. What would be the best way to achieve this?
I was reading subdomain redirection through htaccess but in my case I need the generic redirection to give me the complete uri so for example in the above case the redirected uri should be exactly as specified above. In another case if the incoming request is for
.../region/client/xyz/function2
It should be redirected to
.../state/region/client/xyz/function2
Any help would be really appreciated

Warning when HTTP used instead of HTTPS

I have a pure CherryPy server which has been running for a few years already. I decided recently to add SSL support. In this case it was enough to provide the certificate and key files and to assign correct values to the variables cherrypy.server.ssl_certificate and cherrypy.server.ssl_private_key.
I would like to give a warning about this change whenever somebody tries to access a page using "http://..." instead of "https://...". Is there a simple way of achieving this without many changes in my system? Another option would be to redirect the HTTP access to HTTPS—can that be done easily?
I would create a custom handler to achieve what you're after. This automatically redirects to HTTPS.
class Functions():
def check_ssl(self=None):
# check if url is in https and redirect if http
if cherrypy.request.scheme == "http":
cherrypy.HTTPRedirect(Referer.replace("http:", "https:"))
cherrypy.tools.Functions = cherrypy.Tool('before_handler', check_ssl)