Setting the cookie
Closed this issue · 2 comments
dean-azure commented
Your code offers two examples to set the cookie programatically
app.MapFallbackToFile("index.html", new StaticFileOptions()
{
OnPrepareResponse = ctx =>
{
ctx.Context.Response.Cookies.Append("ai_connString", app.Configuration["ApplicationInsights:ConnectionString"]);
}
});
This is not an option for me because the required libraries are not available in my project.
The second option:
**In the hosting platform
Inject a Cookie called "ai_connString" with the ConnectionString URL Encoded**
Is there an example of how to do this?
- How do I get the configuration settings from javascript?
- How do I inject the cookie?
If this is hosted in Azure does that mean it has to be done from Azure? During dev ops? It is just unclear to me what is meant by this.
IvanJosipovic commented
Check this example, #167 (comment)
dean-azure commented
Thank you