Django Rest Framework deploy show favicon 500 Internal Server Error
P

0

1

I am trying to deploy my Django rest framework to aws eb but when I test the API, it shows

favicon.ico:1 GET http://myapp.....com/favicon.ico 500 (Internal Server Error)

I update my url.py of django project to

from django.views.generic.base import RedirectView  


 urlpatterns = [
        url('favicon.ico', RedirectView.as_view(
            url='/static/favicon/favicon.ico'))...]

But It still shows an internal error.

I already search and found similar questions but not a useful answer.

like that=> How do I edit the favicon in the browsable API in Django rest framework

how to handle favicon request in Django rest framework

My API is pretty separate from the frontend so I can't change frontend for this error.

Update

If I test on local like =>

http://127.0.0.1:8000/favicon.ico

it gets the same result with =>

http://127.0.0.1:8000/api/
Palmieri answered 7/1, 2020 at 7:24 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.