fix: erros de produção
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 4s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 8m19s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 2m19s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 1s
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 4s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 8m19s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 2m19s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 1s
This commit is contained in:
parent
ffac8a787b
commit
55ad73b505
@ -23,6 +23,14 @@ namespace BCards.Web.Middleware
|
|||||||
{
|
{
|
||||||
await _next(context);
|
await _next(context);
|
||||||
|
|
||||||
|
// Verificar se a resposta já começou antes de modificar headers
|
||||||
|
if (context.Response.HasStarted)
|
||||||
|
{
|
||||||
|
_logger.LogDebug("AuthCache: Response already started, skipping header modifications for {Path}",
|
||||||
|
context.Request.Path.Value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Aplicar headers apenas para páginas HTML (não APIs, imagens, etc)
|
// Aplicar headers apenas para páginas HTML (não APIs, imagens, etc)
|
||||||
if (context.Response.ContentType?.StartsWith("text/html") == true)
|
if (context.Response.ContentType?.StartsWith("text/html") == true)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -248,7 +248,9 @@
|
|||||||
"twitter",
|
"twitter",
|
||||||
"instagram"
|
"instagram"
|
||||||
};
|
};
|
||||||
var match = myList.FirstOrDefault(stringToCheck => Model.Links[i].Icon.Contains(stringToCheck));
|
var match = myList.FirstOrDefault(stringToCheck =>
|
||||||
|
!string.IsNullOrEmpty(Model.Links[i].Icon) &&
|
||||||
|
Model.Links[i].Icon.Contains(stringToCheck));
|
||||||
if (match==null)
|
if (match==null)
|
||||||
{
|
{
|
||||||
if (Model.Links[i].Type==LinkType.Normal)
|
if (Model.Links[i].Type==LinkType.Normal)
|
||||||
@ -372,10 +374,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@{
|
@{
|
||||||
var facebook = Model.Links.Where(x => x.Icon.Contains("facebook")).FirstOrDefault();
|
var facebook = Model.Links.Where(x => !string.IsNullOrEmpty(x.Icon) && x.Icon.Contains("facebook")).FirstOrDefault();
|
||||||
var twitter = Model.Links.Where(x => x.Icon.Contains("twitter")).FirstOrDefault();
|
var twitter = Model.Links.Where(x => !string.IsNullOrEmpty(x.Icon) && x.Icon.Contains("twitter")).FirstOrDefault();
|
||||||
var whatsapp = Model.Links.Where(x => x.Icon.Contains("whatsapp")).FirstOrDefault();
|
var whatsapp = Model.Links.Where(x => !string.IsNullOrEmpty(x.Icon) && x.Icon.Contains("whatsapp")).FirstOrDefault();
|
||||||
var instagram = Model.Links.Where(x => x.Icon.Contains("instagram")).FirstOrDefault();
|
var instagram = Model.Links.Where(x => !string.IsNullOrEmpty(x.Icon) && x.Icon.Contains("instagram")).FirstOrDefault();
|
||||||
var facebookUrl = facebook !=null ? facebook.Url : "";
|
var facebookUrl = facebook !=null ? facebook.Url : "";
|
||||||
var twitterUrl = twitter !=null ? twitter.Url : "";
|
var twitterUrl = twitter !=null ? twitter.Url : "";
|
||||||
var whatsappUrl = whatsapp !=null ? whatsapp.Url.Replace("https://wa.me/","") : "";
|
var whatsappUrl = whatsapp !=null ? whatsapp.Url.Replace("https://wa.me/","") : "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user