Method HEAD is not allowed on $metadata
Open
@xuzhg is already working on this.
Since Nov 23, 2021.
investigating
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Version Microsoft.AspNetCore.OData, Version=8.0.4.0
Seems default controller doesn't allow HEAD method requests on $metadata requests: http://www.xx.com/api/<CustomerId>$metadata": The remote server returned an error: (405) Method Not Allowed.
/// <summary>
/// Represents a controller for generating OData service and metadata ($metadata) documents.
/// </summary>
public class MetadataController : ControllerBase
{
private static readonly Version _defaultEdmxVersion = new Version(4, 0);
/// <summary>
/// Generates the OData $metadata document.
/// </summary>
/// <returns>The <see cref="IEdmModel"/> representing $metadata.</returns>
[HttpGet]
public IEdmModel GetMetadata()
{
return GetModel();
}
I use it to make sure my customer's model is online and not to download XML.
Any reason why being so restrictive?
Kind regards
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.