Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
# ABS_PATH('core', 'base_static'),
)

# Allow OSM tile servers to receive a Referer header (required by OSM tile policy).
# Django's SecurityMiddleware defaults to "same-origin", which strips the Referer
# on cross-origin requests, causing OSM tiles to return 403 "Access blocked".
SECURE_REFERRER_POLICY = "strict-origin-when-cross-origin"


# default middleware classes
MIDDLEWARE = [
Expand Down
1 change: 0 additions & 1 deletion core/settings/contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework.authentication.TokenAuthentication",
"oauth2_provider.contrib.rest_framework.OAuth2Authentication",
"rest_framework.authentication.SessionAuthentication",
),
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",),
"DEFAULT_RENDERER_CLASSES": (
Expand Down
1 change: 1 addition & 0 deletions ui/app/components/aoi/ExportAOI.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ export class ExportAOI extends Component {
}),
OSM.ATTRIBUTION
],
crossOrigin: null,
url:
"https://tile.openstreetmap.org/{z}/{x}/{y}.png"
})
Expand Down
Loading