How to enable https scheme for urls?
See original GitHub issueHello, i`m trying to go from drf_yasg to drf-spectacular and i have a question: Is there a way to enable https for your urls, in drf_yash it was done like this:
class APISchemeGenerator(SchemaGenerator):
def get_schema(self, request=None, public=False):
if not request:
print("NET")
try:
schema = super().get_schema(request, public)
except Exception as e:
print(e)
return e
schema.schemes = ['http', 'https'] # this allows me to use http and https for my requests
if not LOCAL:
schema.base_path = '/api/'
return schema
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Enabling HTTPS on your servers - web.dev
Steps covered in this article · Enable HTTPS on your servers · Make intrasite URLs relative · Redirect HTTP to HTTPS ...
Read more >Enabling HTTP Secure (HTTPS)
On Drupal 7, if you want to support mixed-mode HTTPS and HTTP sessions, open up sites/default/settings.php and add $conf['https'] = TRUE; .
Read more >Defining a custom URL scheme for your app
URL scheme registration specifies which URLs to redirect to your app. Register your scheme in Xcode from the Info tab of your project...
Read more >How to Enable HTTPS Tracking Links
Mailgun supports enabling the HTTPS protocol on open, click and unsubscribe tracking URLs. Mailgun utilizes Let's Encrypt with HTTP-01 challenges via your ...
Read more >URL Scheme Rewriting, from HTTP to HTTPS, for Specific ...
Adding abc.xyz.com to the browser's HSTS preloaded list seems like the best way to do this, but that can only by initiated and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello again, i was able to do what i needed with protocols. The documentation says that if your servers variable in empty ‘url’ will be set to ‘/’ by default, so i just added variables and scheme selector appeared.
Ok, thank you for answers, i will try to come up with something for that case