Skip to content

Commit

Permalink
Merge pull request #38 from kartoza/remove-http-schema-non-debug
Browse files Browse the repository at this point in the history
Remove HTTP schema when in non-debug env
  • Loading branch information
danangmassandy authored May 31, 2024
2 parents 6e025b0 + 5476a22 commit 5814737
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_project/core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class CustomSchemaGenerator(OpenAPISchemaGenerator):
def get_schema(self, request=None, public=False):
schema = super().get_schema(request, public)
schema.schemes = ['https']
# if settings.DEBUG:
schema.schemes = ['http'] + schema.schemes
if settings.DEBUG:
schema.schemes = ['http'] + schema.schemes
return schema


Expand Down

0 comments on commit 5814737

Please sign in to comment.