This message was deleted.
# dotnet
s
This message was deleted.
b
This doesn’t look like an an action issue? Do you not get this issue locally?
a
running self-hosted runner - ubuntu
not getting it when running locally
b
are you setting CORS, or trying to set it?
a
Yes, setting CORS on blob service
b
Can you share your code?
a
Copy code
public static BlobServiceProperties AddBlobCorsRules(this StorageAccount account,
        GetResourceGroupResult resourceGroup,
        string propertiesName)
    {
        InputList<string> allowedOrigins = new InputList<string>();

        if (DeploymentEnvironment.IsDebug)
        {
            allowedOrigins = new[] {"*"};
        }
        else if (DeploymentEnvironment.IsStaging)
        {
            allowedOrigins = new[] { TrafficManagerCommonInfo.DevHostName, TrafficManagerCommonInfo.StagingHostName };
            allowedOrigins.AddRange(TrafficManagerCommonInfo.PullRequestTrafficManagerInfoList.Select(e => e.Fqdn).ToArray());
        }
        else if (DeploymentEnvironment.IsProduction)
        {
            allowedOrigins = new[] { TrafficManagerCommonInfo.ProductionHostName };
        }
        
        var properties = new BlobServiceProperties(propertiesName, new BlobServicePropertiesArgs
        {
            AccountName = account.Name,
            ResourceGroupName = resourceGroup.Name,
            BlobServicesName = "default",
            Cors = new CorsRulesArgs
            {
                CorsRules = new[]
                {
                    new CorsRuleArgs
                    {
                        AllowedHeaders = new[]
                        {
                            "*"
                        },
                        AllowedMethods = new[]
                        {
                            "GET", "POST", "PATCH"
                        },
                        AllowedOrigins = allowedOrigins,
                        ExposedHeaders = new[]
                        {
                            "*"
                        },
                        MaxAgeInSeconds = 3000
                    }
                }
            }
        });

        return properties;
    }
using Pulumi.Azure 5.13.0 and Pulumi.AzureNative 1.66.0
b
It’s not totally clear, but I suspect the issue is in your allowedOrigins, I’d start by checking that and eliminating it as a possibility
but the issues you’re getting isn’t related to actions, it’s because your cors settings aren’t correvt
a
I believe you are right. The property is not being set when running on runner.
Yep, that was the issue. Thanks for helping out.
🎉 1