Skip to content

Question: producing https addresses using url_for #538

@cglacet

Description

@cglacet

I'm looking for a way to produce static file routes with https prefixes instead of the default http. For example, say I have the following template:

<script src="{{ url_for('static', path='file.js') }}"></script>

I would like it to produce:

<script src="https://my-app.herokuapp.com/static/file.js"></script>

I don't find information about this on the documentation, so I was wondering if it was possible? I can't use the <script src="/static/file.js"></script> form because I want to use the generated html on a different domain.

In case it makes a difference: I'm using fastAPI and the app is running on heroku.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions