swagger-api / swagger-api/swagger-ui

WITH_CREDENTIALS env variable in DOCKER doesn't work

Open
#6,355 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: docker Hacktoberfest type: question
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A (please complete the following information)
  • OS: using your latest Docker image
  • Browser: Firefox
  • Version: 79.0 (64-bit)
  • Method of installation: Docker
  • Swagger-UI version: latest
  • Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration

Nothing configured. Using OOB-Docker Image

Swagger/OpenAPI definition:

# your YAML here

It's not an issue with the OpanAPI yaml

Swagger-UI configuration options:

SwaggerUI({
  // your config options here
})

Nonme. Using OOB-Docker Image

?yourQueryStringConfig

When using /?withCredentials=true#, setting cookies works. When NOT using it but relying on environemnt variable WITH_CREDENTIALS: "true" it doesn't work. Cookies not set.

Screenshots

With URL parameter:
image

Without, also showing the env:
image

How can we help?

Maybe tell me how to activate "withCredentials" so that I do not have to give it in URL.

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 by reproducing the issue with the latest Swagger UI Docker image, comparing the WITH_CREDENTIALS: "true" environment variable with the ?withCredentials=true URL parameter. Trace the Docker configuration that maps environment variables into Swagger UI settings. Done means the environment variable enables credentialed requests and the behavior matches the URL parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript
Domain
devops, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.