ampproject / ampproject/amphtml

amp-autocomplete: Please add XSSI prefix support

Open
#36,150 2 comments 0 reactions 0 assignees View on GitHub
Stale Type: Feature Request
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

Unlike every other extension component I've used to date, ```amp-autocomplete``` does not support the AMP-standard XSSI prefix stripping for remote data sources.

This would obviously be useful, alongside the CORS specification, in stopping XSSI and similar (data-scraping) attacks.

### Alternatives Considered

One could create a distinct CORS endpoint that does not return the XSSI prefix, but that only solves the superficial issue of getting the component working; it still leaves it open to exploitation.

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating amp-autocomplete's remote data-source handling and compare it with XSSI prefix stripping in the other extension components mentioned by the issue. Done means amp-autocomplete accepts AMP-standard XSSI-prefixed responses without requiring a separate CORS endpoint, with tests covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.