-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use explicit regex for accepted add-on types in AMO routes #10363
Comments
We can also remove error handling code in the component for 404s |
This should be doable once mozilla/addons-frontend#5652 lands. |
Hey guys 👋🏽I'd like to help with this if it's still available! |
@seanprashad sure! This issue is about:
|
Ok, I've made some progress and would like to make sure I'm not heading down the wrong 🐰hole @willdurand: All of the Three occurrences of I figured that finding the list of acceptable addon types would be the next move. Within the definition of Now we'll have to figure out the right regex that will conform to all 7 valid types. I'm not sure where to place the hardcoded expression and where we'll need to do something like Is there anything I missed along the way that might give me some clues? |
I believe only "themes" or "extensions" are used: export const API_ADDON_TYPES_MAPPING = {
extensions: ADDON_TYPE_EXTENSION,
themes: ADDON_TYPE_THEME,
}; |
You can add the values in the |
Gotcha - for reference, the |
@willdurand Please add some STR for qa or mark it "qa not needed". |
@ioanarusiczki sorry, please check that we can still navigate to the landing pages (extensions, themes) and category pages (including the android page with the list of all categories). |
Verified on AMO dev with FF63 - Win10 & Android 8.0 |
Once we get the new router (which will probably happen in #10295) then we can change all of these routes:
to a specific regex list of accepted types, like:
This will prevent confusing 500 errors when you type in a URL like
/en-US/firefox/users/register/
.The text was updated successfully, but these errors were encountered: