Comments (13)
I'll have a patch for this tomorrow.
from vaporsecurityheaders.
@EvanHahn yep definitely up for updating the library to whatever the current best practices are. Looking through the discussions, instead of it being removed entirely it sounds like the header should be set to X-XSS-Protection: 0
by default. Am I reading that right?
from vaporsecurityheaders.
Exactly. Continue to set the header, but set its value to 0
.
BTW, if there are other things I can help with as a maintainer of a similar module, let me know. My email is [email protected].
from vaporsecurityheaders.
Would you like me to make a pull request for this?
from vaporsecurityheaders.
@EvanHahn it's on my todo list but if you want to take it on that would be awesome!
from vaporsecurityheaders.
from vaporsecurityheaders.
I haven't made any changes yet, but swift test
fails for me. I'm using Swift 5.6. Am I doing something wrong? (I'm relatively new to Swift so I probably am!)
from vaporsecurityheaders.
@EvanHahn How are you installing Swift and which OS are you on? And what's the error. If you're on macOS and haven't installed Xcode it won't work unfortunately. (There's some legacy stuff to separate out the old Objective-C runtime which is used on macOS instead of the Swift runtime for tests). You could try Docker or just let CI sort it out.
If you're not on macOS then I should be able to work out what's going on with the error
from vaporsecurityheaders.
I'm on macOS and I do have Xcode installed. I'll grab the errors for you when I'm next at a computer.
from vaporsecurityheaders.
A lot of ambiguous usages:
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:44:67: error: ambiguous use of 'xContentTypeOptions'
XCTAssertEqual(expectedXCTOHeaderValue, response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:45:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:59:67: error: ambiguous use of 'xContentTypeOptions'
XCTAssertEqual(expectedXCTOHeaderValue, response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:60:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:74:67: error: ambiguous use of 'xContentTypeOptions'
XCTAssertEqual(expectedXCTOHeaderValue, response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:75:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:89:67: error: ambiguous use of 'xContentTypeOptions'
XCTAssertEqual(expectedXCTOHeaderValue, response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:90:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:101:40: error: ambiguous use of 'xContentTypeOptions'
XCTAssertNil(response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:109:53: error: ambiguous use of 'xContentTypeOptions'
XCTAssertEqual("nosniff", response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:249:47: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(csp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:269:47: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(csp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:278:47: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(csp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:288:47: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(csp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:301:57: error: ambiguous use of 'contentSecurityPolicy'
guard let cspResponseHeader = response.headers[.contentSecurityPolicy].first else {
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:306:65: error: cannot infer contextual base in reference to member 'utf8'
guard let reportToJson = replacedCSPHeader.data(using: .utf8) else {
~^~~~
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:336:47: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(csp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:356:47: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(csp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:376:47: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(csp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:489:55: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCsp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:513:55: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCsp, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:536:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:559:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:573:64: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual("default-src 'none'", response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:587:64: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual("default-src 'none'", response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:598:67: error: ambiguous use of 'xContentTypeOptions'
XCTAssertEqual(expectedXCTOHeaderValue, response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:599:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:612:67: error: ambiguous use of 'xContentTypeOptions'
XCTAssertEqual(expectedXCTOHeaderValue, response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:613:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:630:67: error: ambiguous use of 'xContentTypeOptions'
XCTAssertEqual(expectedXCTOHeaderValue, response.headers[.xContentTypeOptions].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:335:27: note: found this candidate
public static let xContentTypeOptions = Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:7:16: note: found this candidate
static let xContentTypeOptions = HTTPHeaders.Name("X-Content-Type-Options")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Tests/VaporSecurityHeadersTests/HeaderTests.swift:631:66: error: ambiguous use of 'contentSecurityPolicy'
XCTAssertEqual(expectedCSPHeaderValue, response.headers[.contentSecurityPolicy].first)
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Name.swift:111:27: note: found this candidate
public static let contentSecurityPolicy = Name("Content-Security-Policy")
^
/Users/evanevanhahnhahn/code/others/VaporSecurityHeaders/Sources/VaporSecurityHeaders/SecurityHeaders+HeaderKey.swift:5:16: note: found this candidate
static let contentSecurityPolicy = HTTPHeaders.Name("Content-Security-Policy")
from vaporsecurityheaders.
@EvanHahn looks like newer versions of the compiler were being more strict about duplicate symbols. I've pushed an update to fix all these and updated the branch to main
if you want to pull from that. Thanks!
from vaporsecurityheaders.
That solved it! Thank you.
from vaporsecurityheaders.
Made a pull request (#26). Feedback welcome!
from vaporsecurityheaders.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vaporsecurityheaders.