Skip to content
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

Serve 404 from Inspector instead of pypi.org #159

Closed
miketheman opened this issue Mar 27, 2024 · 0 comments · Fixed by #160
Closed

Serve 404 from Inspector instead of pypi.org #159

miketheman opened this issue Mar 27, 2024 · 0 comments · Fixed by #160
Labels
enhancement New feature or request

Comments

@miketheman
Copy link
Member

miketheman commented Mar 27, 2024

When using Inspector in an iframe, if the package lookup isn't found, a 404 from pypi.org is served.

This makes setting frame-src directives in a content security policy longer, since now it has to allow two domains, instead of serving the 404 directly.

In or around here:

if resp.status_code != 200:
return redirect(pypi_project_url, 307)

@miketheman miketheman added the enhancement New feature or request label Mar 27, 2024
miketheman added a commit to miketheman/inspector that referenced this issue Mar 27, 2024
Resolves pypi#159

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@di di closed this as completed in #160 Mar 28, 2024
di pushed a commit that referenced this issue Mar 28, 2024
Resolves #159

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant