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

fix: load non json resources without blob #162

Merged
merged 1 commit into from
May 5, 2023
Merged

Conversation

catalan-adobe
Copy link
Collaborator

fixes #161

@kptdobe
Copy link
Contributor

kptdobe commented Apr 18, 2023

With the change, custom headers will no be applied to non json resources.

@kptdobe
Copy link
Contributor

kptdobe commented May 3, 2023

Closing for now.

@kptdobe
Copy link
Contributor

kptdobe commented May 5, 2023

The blob approach sets the window.location.href to the blob url which is not desirable: in case of JS, this can completely break the loaded page. We then need to load the page in the iframe with the proxy url for html rendition.
In the case of an HTML page, this means that the first request to validate the page state can use the headers but NOT the iframe loading one. The headers becomes almost useless if they would be necessary. We leave it as is for now, let see if someone encounter a case where this would be an issue. We would then need to handle the headers differently, either when starting the cli (via a config file for example) or send the headers as a query parameter to the proxy.

We keep the blob for JSON resource only, the headers are fully useful here.

@kptdobe kptdobe merged commit 02df655 into main May 5, 2023
@kptdobe kptdobe deleted the custom-headers-4 branch May 5, 2023 09:56
github-actions bot pushed a commit that referenced this pull request May 5, 2023
## [1.38.3](v1.38.2...v1.38.3) (2023-05-05)

### Bug Fixes

* load non json resources without blob ([#162](#162)) ([02df655](02df655))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML pages not loading properly in the iframe preview since using blob URL
2 participants