Skip to content

may be error if set static / to someone path,options method can not be access #1130

@hastonewy

Description

@hastonewy

Bug Description

`python

urlpre='/'
dir=os.path.join(os.getcwd(),'public/root')
...
app.directories.append(
Directory(
route=urlpre,
directory_path=dir,
show_files_listing=True,
index_file="index.html",
)
)
`

`bash

root @ DEVST6 in ~/_work [23:24:25]

$ curl -I -X OPTIONS http://172.31.2.20:8101/admin/user/login
HTTP/1.1 405 Method Not Allowed
content-length: 50
content-type: text/plain; charset=utf-8
date: Sun, 02 Mar 2025 15:24:26 GMT

if set urlpre to others path

root @ DEVST6 in ~/_work [23:24:27]

$ curl -I -X OPTIONS http://172.31.2.20:8101/admin/user/login
HTTP/1.1 204 No Content
access-control-allow-origin: *
access-control-allow-credentials: true
access-control-allow-methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
access-control-allow-headers: Content-Type, Authorization
access-control-max-age: 3600
date: Sun, 02 Mar 2025 15:26:05 GMT
`

Steps to Reproduce

No response

Your operating system

None

Your Python version (python --version)

None

Your Robyn version

None

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions