You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/pwabuilder-microsoft-store/Services/WindowsAppPackageCreator.cs
+36-34Lines changed: 36 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -67,13 +67,14 @@ public async Task<WindowsAppPackageResult> CreateAppPackageAsync(WindowsAppPacka
67
67
{
68
68
ValidateOptions(options);
69
69
70
+
// COMMENTED OUT 2/25/2026 - This code had unintended consequences. For example, this code would detect https://app.eyegifs.com redirects to https://app.eyegifs.com/account/login. But if the user is logged in, we want the PWA to keep the original url and not redirect to login.
logger.LogInformation("Detected redirect for {url}, redirecting to {target}. Will use the redirect target for packaging.",options.Url,redirectUri);
75
-
options.Url=redirectUri;
76
-
}
72
+
// var redirectUri = await TryCheckForRedirect(options.Url);
73
+
// if (redirectUri != null)
74
+
// {
75
+
// logger.LogInformation("Detected redirect for {url}, redirecting to {target}. Will use the redirect target for packaging.", options.Url, redirectUri);
/// Checks if the specified URL results in a redirect (301 or 307). If so, returns the Location target of the redirect.
131
-
/// </summary>
132
-
/// <remarks>
133
-
/// This fixes a bug (https://github.com/pwa-builder/PWABuilder/issues/4956) where if the user packages a URL that causes a redirect, Edge doesn't properly handle the installed PWA.
134
-
/// We fix the bug by checking if there's a redirect for the URL and if so, returns the redirect target URL.
135
-
/// An example as of June 2025 is https://microsoftedge.github.io/Demos/wami, which redirects to https://microsoftedge.github.io/Demos/wami/ (notice the ending slash).
136
-
/// </remarks>
137
-
/// <param name="options"></param>
138
-
/// <returns>The redirect target URL if there is one.</returns>
logger.LogWarning(httpError,"Unable to check the URL for redirect due to HTTP error.");
153
-
}
154
-
155
-
returnnull;
156
-
}
130
+
// COMMENTED OUT: 2/25/2026 - This code had unintended consequences. For example, this code would detect https://app.eyegifs.com redirects to https://app.eyegifs.com/account/login. But if the user is logged in, we want the PWA to keep the original url and not redirect to login.
131
+
// /// <summary>
132
+
// /// Checks if the specified URL results in a redirect (301 or 307). If so, returns the Location target of the redirect.
133
+
// /// </summary>
134
+
// /// <remarks>
135
+
// /// This fixes a bug (https://github.com/pwa-builder/PWABuilder/issues/4956) where if the user packages a URL that causes a redirect, Edge doesn't properly handle the installed PWA.
136
+
// /// We fix the bug by checking if there's a redirect for the URL and if so, returns the redirect target URL.
137
+
// /// An example as of June 2025 is https://microsoftedge.github.io/Demos/wami, which redirects to https://microsoftedge.github.io/Demos/wami/ (notice the ending slash).
138
+
// /// </remarks>
139
+
// /// <param name="options"></param>
140
+
// /// <returns>The redirect target URL if there is one.</returns>
0 commit comments