How to Mapping CDN Endpoint to Azure Cloud Service Single Box ( Multiple Sites (Reset API) in One Service) - azure-cloud-services

We have single cloud service for all rest api services including HTML app.
I need to map our CDN endpoint to HTML App.
Please suggest solution for this.
Thanks.

From what you've provided, you should just be able to create a CDN endpoint, and set the "Origin Path" to the relative path of your HTML App, during creation in the Azure Portal.
Hope that helps.

Related

Google API application restrictions with Cloud Run

I have a website that use Nuxt for server render and deployed using Cloud Run.
It pulls the YouTube videos of a channel using the YouTube Data API key and pre-rendered it before send to the browser. This is for SEO purpose.
Currently I using the API key restriction option HTTP referrers (web sites) to only allow access from my website.
But on the server when it pre-rendered the API is blocked.
Is there a good solution to add the referrer and allow for Cloud Run to use the API key?
I found a solution which is in my opinion is not the best yet.
I have 2 separate key Youtube API server and Youtube API web.
server key has no restriction
web key is restrict to HTTP referrers (web sites)
In my Nuxt app, when query for server side render, I use the server key. Then when it passed to client side. It use the web key.
This way I protect the "no restriction" key.
I'm not sure any better solution but I imagine in the future, server key without restrictions can be use for multiple services other than Youtube API and only server side have access to that key.

How to implement Amazon MWS api in MVC Web API?

I am new to Amazon marketplace web service (MWS). I have read documentation of web service but I am unable to understand which api suit for update quantity and price of single or multiple product at one time.
Here is link that I am reading so far and don't know where to start.(http://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html)
Can you guys suggest me where to start?
Check out the feed types. You're going to want to submit a pricing or inventory feed to update your inventory. Once you have a feed created, you submit that using the SubmitFeed operation.
For an overview on how feeds works, check out this What you should know about the Amazon MWS Feeds API section.
Specifically for ASP.NET, there is an SDK built that will help you greatly. If you want to know how to implement that as a web api, that's another topic, but you can wrap code from the SDK inside a web api endpoint. But start with understanding MWS.

Is it possible to add a favicon to sefl-hosted web api service?

I have many services that I'm moving from ordinary Web API to Owin/Katana as self-hosted web api services. Because we were somehow using Microservices, we have many small services that would run and all of them had the same favicon.ico that showed our branding across our services to developers. Is it possible to add a favicon to self-hosted web api? How?
Yes, a GET request to /favicon.ico just needs to return your favicon file.
I haven't set up Katana routing before, but you could try the Microsoft.Owin.StaticFiles package, and you can set up something like this.

Can you build an ASP.NET Web API on top of OWIN?

Well the title basically sums it up, I'm wondering if I can create an OWIN pipeline to my ASP.NET Web API. I want to do this so I can apply a base security layer that I can apply to all of my API service hosted on my service server. New to OWIN, love the idea
Yes. You can start with this http://nuget.org/packages/Microsoft.AspNet.WebApi.Owin/0.21.0-pre and then you will need an another package depending on what host you choose.
You will find below link helpful. It using Katana, an OWIN implementation for Microsoft hosts and the Web API framework.
http://www.strathweb.com/2012/12/running-aspnet-web-api-with-owin-and-katana/
Yes.
Also: If self-hosting Web API 2 using OWIN in a windows service, you can check out this example on GitHub: https://github.com/danesparza/OWIN-WebAPI-Service
It walks you through creating the service, adding OWIN using NuGet, and using attribute based routing in Web API 2.

Does Google Gadget works for an Internal Corporate Site?

We would like to use the Google Gadget concept in our corporate Intranet. Our infrastructure implies no external web dependencies.
The way I understand Google Gadget is that the gadget xml file requires some pre-processing before being displayed in a Html page:
<script src="http://www.gmodules.com/ig/ifr?url=http://mysite.com/my-gadget.xml
Is this mean I cannot render a gadget in a Page without this pre-processing?
Thank you
Not sure if this helps, but it is also possible to have google widgets make use of secure data behind a firewall by using the the Google Secure Data Connector
The browser still needs to have access to google servers to execute the widget, just data requests will be made to google and then be proxied back to a service running in your network which will then fetch the data.

Resources