Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle prefix="" in CustomProvider() #944

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 5, 2024

  1. Properly handle prefix="" in CustomProvider()

    It might be that an app could support either running behind a reverse
    proxy or directly. In the latter case, prefix would be "". This modifies
    CustomProvider to properly handle that case.
    
    Previously, CustomProvider() would apply this to prefix unconditionally:
    
    	prefix = "/" + strings.Trim(prefix, "/")
    
    Starting with prefix = "", prefix would become "/", making appWASM
    "//web/app.wasm". A browser that acted on such a path might erroneously
    load, e.g., "http://web/app.wasm".
    
    Now, CustomProvider() only trims and concatenates when prefix != "".
    
    Signed-off-by: W. Michael Petullo <mike@flyn.org>
    flyn-org committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    c88eed1 View commit details
    Browse the repository at this point in the history