Skip to content

Commit

Permalink
include allowed host section
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Apr 18, 2024
1 parent 980d785 commit 4c6876c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
4 changes: 0 additions & 4 deletions docs/61_dandi_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,3 @@ For `.env.production`: This should also be located in the `web/` sub-directory -

You'll need to update the relevant values that reflect what was in your `Social Application` object for both files. You will also notice an environment variable related to `Sentry` -- this value can be obtained from your Sentry account.





20 changes: 20 additions & 0 deletions docs/64_dandi_archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,26 @@ The only other major initial setup step for the DANDI Archive frontend is regard

## Updating Allowed Hosts

For the Django-based DANDI Archive API to receive and send HTTP requests without CORS errors, you'll need to update `ALLOWED_HOSTS` within the `dandiapi/settings.py` file.

The `settings.py` file, in general, can be understood as the configuration file for the Django app -- [see the Django docs for more info here](https://docs.djangoproject.com/en/5.0/topics/settings/)

For the `ALLOWED_HOSTS` value to work, the following code snippet can be added, for example:

```python
class HerokuProductionConfiguration(DandiMixin, HerokuProductionBaseConfiguration):
...other configurations...

if 'ALLOWED_HOSTS' not in globals():
ALLOWED_HOSTS = []

ALLOWED_HOSTS += [
'<your-api-url>'
]
```

## Approval of Users



## Setting up Staging Environments

0 comments on commit 4c6876c

Please sign in to comment.