phaserjs / phaserjs/phaser

MergeXHRSettings doesn't merge username and password

Open
#7,256 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
40.3k
Forks
7.2k
PR merge metrics
No merged PRs in 30d

Description

Version

  • Phaser Version: Phaser 4.0.0 RC6
  • Operating system: Windows 11
  • Browser: any

Description

When using loader.user and loader.password globally, the value gets ignored by Loader because MergeXHRSettings prefers the file's config (which doesn't have user or password) which in turns removes the username and password.

Example Test Code

https://phaser.io/sandbox/7HVaFUcR
test code is here, the request to https://cdn.phaser.io/sandbox/square-earth.png doesn't have a Authorization header when it should have one.

Additional Information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the MergeXHRSettings entry point and trace how global loader.user and loader.password are combined with a file's configuration. Reproduce the request using the linked Phaser sandbox, then verify that the request for square-earth.png includes the expected Authorization header.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.