bevyengine / bevyengine/bevy

Web Assets feature: Some way to set Headers for requests

Open
#21,352 0 comments 3 reactions 0 assignees View on GitHub
A-Assets C-Feature D-Modest S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

A common authentication scheme is providing Tokens/Keys as a Header. Similarily, some public services require, in their ToS/License, a custom User-Agent header for each application with some kind of identifiable information (email address of developer) they can use to reach out in case of (accidental) abuse.

## What solution would you like?
My ideas:
- A pre-request callback which is passed the asset path (URL) and can return settings for that request (more flexible)
- A field on the plugin which allows customizing request settings like Headers per (sub-)domain

## What alternative(s) have you considered?

Relying on third party libraries for this: Duplicates work and code to maintain

## Additional context

There is a series of PRs for bevy_web_asset about this, partially by me, which never got merged.
- https://github.com/johanhelsing/bevy_web_asset/pull/24
- https://github.com/johanhelsing/bevy_web_asset/pull/35 (mine)
- https://github.com/johanhelsing/bevy_web_asset/pull/36 (mine)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the three linked bevy_web_asset pull requests and the surrounding web-assets plugin API; no source files or tests are named in the issue. The work is done when the project has an agreed, tested way to supply request headers for asset URLs, including authentication and identifiable User-Agent values.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.