Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: deepgram/deepgram-js-sdk Loading
base: main
Choose a base ref
...
head repository: All-Turtles/deepgram-js-sdk Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 20, 2024

  1. Updates to allow proxying via the mmhmm service API

    In order to use the Deepgram REST API from the browser, we need to proxy
    requests through our backend - their backend doesn't support CORS.
    
    When we proxy requests, we want to include our own authentication token
    in the Authorization header so that only authenticated mmhmm can access
    the proxy endpoint. The Deepgram SDK was prohibiting this; they required
    the use of the literal string "proxy" in the Authorization header when
    proxying.
    
    When we proxy requests, we want to prepend a path segment so that we can
    host this under api.mmhmm.app, instead of having to use a separate
    hostname for the proxy. The Deepgram SDK was prohibiting this by
    removing the trailing slash from our proxy URL.
    sethhitch committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    4118eaa View commit details
    Browse the repository at this point in the history
  2. style: correct indentation

    The formatter fixed my bad indentation.
    sethhitch committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    fbabe46 View commit details
    Browse the repository at this point in the history
  3. fix: support bearer token authorization

    The standard format for bearer token authorization is:
    Authorization: Bearer {token}
    
    However, Deepgram replaces the word "Bearer" with "Token":
    Authorization: Token {token}
    
    When proxying REST requests through our backend, we need to use OUR
    authorization mechanism, which requires the standard "Bearer". With this
    change we look for the "Bearer " prefix in the API key and, if found,
    use it as-is. Otherwise we maintain the existing Deepgram behavior.
    sethhitch committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    5a96fbe View commit details
    Browse the repository at this point in the history
Loading