Skip to content

Commit

Permalink
Revert mannual headers, not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 committed Dec 17, 2021
1 parent 1b369b3 commit e842824
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ def get(self):
class LanguageHandler(CorsMixin, RequestHandler, ABC):
CORS_ORIGIN = '*'

def set_default_headers(self):
self.set_header("Access-Control-Allow-Origin", "*")
self.set_header("Access-Control-Allow-Headers", "x-requested-with")
self.set_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS')

async def get(self, *args, **kwargs):
langs = await get_all_language()
size = len(langs)
Expand All @@ -40,23 +35,13 @@ async def get(self, *args, **kwargs):
class RepositoryHandler(CorsMixin, RequestHandler, ABC):
CORS_ORIGIN = '*'

def set_default_headers(self):
self.set_header("Access-Control-Allow-Origin", "*")
self.set_header("Access-Control-Allow-Headers", "x-requested-with")
self.set_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS')

async def get(self, *args, **kwargs):
await trending(self, REPOSITORY)


class DeveloperHandler(CorsMixin, RequestHandler, ABC):
CORS_ORIGIN = '*'

def set_default_headers(self):
self.set_header("Access-Control-Allow-Origin", "*")
self.set_header("Access-Control-Allow-Headers", "x-requested-with")
self.set_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS')

async def get(self, *args, **kwargs):
await trending(self, DEVELOPER)

Expand Down

0 comments on commit e842824

Please sign in to comment.