Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Merge branch 'main' into playground-uses-public-url
Ania Warzechaa8b5725f3613
diff --cc CHANGELOG.mdindex bb737888cc,00255104fd..4920843135--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -31,4 -31,4 +31,5 @@@ All notable, unreleased changes to thi- Fixed order-level discounts handling when using tax app for tax calculation - #16696 by @zedzior- Fixed bug when manual line discount doesn't override line-level vouchers - #16738 by @zedzior- Skipped obsolete payload save and cleanup for successful sync webhooks - #16632 by @cmiacz+ - Removed support for the django-debug-toolbar debugging tool and the `ENABLE_DEBUG_TOOLBAR` env variable - #16902 by @patrys+- Fixed playground not displaying docs if api is hidden behind reverse proxy - #16810 by @jqobdiff --cc saleor/graphql/views.pyindex c5bde7811d,d2b0ec2668..9b965c22b5--- a/saleor/graphql/views.py+++ b/saleor/graphql/views.py@@@ -113,22 -112,13 +113,20 @@@ class GraphQLView(View)if settings.PLAYGROUND_ENABLED:return self.render_playground(request)return HttpResponseNotAllowed(["OPTIONS", "POST"])- elif request.method == "POST":+ if request.method == "POST":return self.handle_query(request)- else:- if settings.PLAYGROUND_ENABLED:- return HttpResponseNotAllowed(["GET", "OPTIONS", "POST"])- else:- return HttpResponseNotAllowed(["OPTIONS", "POST"])+ if settings.PLAYGROUND_ENABLED:+ return HttpResponseNotAllowed(["GET", "OPTIONS", "POST"])+ return HttpResponseNotAllowed(["OPTIONS", "POST"])def render_playground(self, request):+ if settings.PUBLIC_URL:+ api_url = urljoin(settings.PUBLIC_URL, str(API_PATH))+ plugins_url = urljoin(settings.PUBLIC_URL, "/plugins/")+ else:+ api_url = request.build_absolute_uri(str(API_PATH))+ plugins_url = request.build_absolute_uri("/plugins/")+return render(request,"graphql/playground.html",