ampproject / ampproject/amp-toolbox

Should relative hosts support be removed from optimizer?

Open
#697 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
459
Forks
242
PR merge metrics
No merged PRs in 30d

Description

Based on https://github.com/ampproject/amphtml/issues/27546 , it sounds like absolute, HTTPS URLs should be required for parameter `ampUrlPrefix` used in `DomTransformer.transformHtml()`.

In optimizer,
- should we remove support for relative hosts?
- should we require HTTPS URLs?

We should keep in mind that some users may want to test optimized AMP pages in local dev environments (e.g. `localhost` or HTTP), so it _may_ be best to make no changes.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked AMP issue 27546 and the optimizer entry point DomTransformer.transformHtml(), focusing on how ampUrlPrefix currently handles relative, HTTPS, localhost, and HTTP URLs. Done means reaching and documenting a decision on whether relative hosts should be removed, HTTPS required, or current behavior retained for local development.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.