swagger-api / swagger-api/swagger-ui

Is there a way, how I can disable csrf for swagger?

Open
#5,153 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi together,

I use a double submit technique to prevent an unauthorized and unwarranted access. This carries a restriction of usage of Swagger. In my current setup to prove that I have "the right to write", I should manually copy a security token (x-xsrf-token) from the last request to the new request every time, if I want to interact with my API using PUT, POST or DELETE method.

Is there a way, how I can disable csrf for swagger?
Or do you have an idea, how I can solve my issue?

Thanks

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

The issue does not name a file, test, or entry point. Start by reviewing Swagger UI's handling of CSRF-related request headers and its configuration for secured PUT, POST, and DELETE requests; done would require a clear, supported way to address the reported token workflow or an agreed alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.